Github integration for Google Cloud Container Builder, using Google Cloud Functions to update Github commit status when a build reaches a specific state.
- Create a Github personal access token with
repo:statusscope here. - Set the
PROJECT_IDvariable:
export PROJECT_ID=my-project-id
-
[Optionally] Set a specific
BUCKET_NAME,FUNCTION_NAMEandREGION. -
Create the function:
npm run setup
The teardown script will delete the function FUNCTION_NAME, and the bucket BUCKET_NAME.
npm run teardown
Each build invokes the function 3 times:
- when the build is queued
- when the build starts
- when the build reaches a final status.
Here is the GCF pricing for calculation.
Yes, specify the BUCKET_NAME:
exports BUCKET_NAME=my-bucket
If you use the setup script with the same FUNCTION_NAME, it will update the existing function.