Skip to content

Instantly share code, notes, and snippets.

@jbmlaird
jbmlaird / run-build-locally.sh
Created January 8, 2019 15:33
Manually run a CircleCI build via the API
#!/usr/bin/env bash
# Run CircleCI builds manually using this script
# Most useful for when you have a workflow set up that doesn't execute on the branch that you are pushing to
export CIRCLE_TOKEN=YOUR_CIRCLE_TOKEN
export GIT_COMMIT_REVISION=YOUR_GIT_COMMIT_REVISION_TO_BUILD
export VSC=github
export VSC_ACCOUNT=YOUR_VSC_USERNAME
export VSC_REPO_NAME=YOUR_VSC_REPO_NAME
@jbmlaird
jbmlaird / pubsub_operator_clear_tis.py
Last active September 21, 2018 12:30
Pull messages from Pub/Sub clearing task instances
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
import datetime as dt
import json
import logging
@jbmlaird
jbmlaird / pubsub_operator_without_ti
Last active January 22, 2019 22:40
Pull from Pub/Sub
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
import datetime as dt
import json
import logging