stealthybox / container-builder-github-ci-status

Google Cloud Function responds to PubSub events on the cloud-builds topic to update GitHub CI status.
MIT License
23 stars 4 forks source link
ci-status cloud-build cloud-functions container-builder github-bot google-container-registry

Container Builder GitHub CI connector for Google Cloud Functions

Cloud Function to use the PubSub events on the cloud-builds topic to update GitHub CI status.

This function is designed to work with GitHub repositories mirrored under Google Cloud Source Control named github-${config.repoOwner}-${ghRepoName}. If you set this through the Container Builder build trigger UI, this will be named automatically.

Deploy

Generate a new token with the repo:status OAuth scope.

Set the following on config in index.js:

Deploy the cloud function to gcloud:

gcloud beta functions deploy setCIStatus --trigger-topic cloud-builds

Behavior

CI Status context will be one of:

Use the tags field in your build request to name your CI. Otherwise, it falls back to the build-GUID.

CI Status description will either be: