Cloud Build Ops is a tool that lets you manage Cloud Build pipeline configuration from yaml files which makes managing Cloud Build much easier and faster.
You will still need to add your repository to Cloud Build via the console (i.e. Connect Repository). However, all of the management after adding the repository can be managed by this tool.
Write all existing cloud build pipelines to file
Flag | Description | Required |
---|---|---|
-projectid / -p | Project ID of the GCP project | TRUE |
-output / -o | Output directory to publish config files | TRUE |
./cloudbuildops get -p my-first-project -o pipelines
Create/Update cloud build pipelines from the proveided config files
Flag | Description | Required |
---|---|---|
-config / -c | Path to config files (Supports wildcards) | TRUE |
./cloudbuildops push -c pipelines/*
For convenience you can use the published Docker container.
Container: guywatson/cloudbuildops:latest
The service account will need the below permissions
- Cloud Build Editor
- Cloud Build Viewer
docker run \
-e GOOGLE_APPLICATION_CREDENTIALS=/service_account.json \
-v $PWD/service_account.json:/service_account.json \
-v $PWD/output:/output \
guywatson/cloudbuildops:latest \
get --projectid MY_PROJECT --output /output