From gcp-toolkit
Configures Google Cloud Build pipelines with Docker caching, parallel steps, GitHub triggers, and gcloud commands for fast CI/CD. Use for cloudbuild.yaml setup and build optimization.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gcp-toolkit:cloud-build-helperThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Configure Cloud Build pipelines with proper caching and optimization for fast, efficient builds.
Configure Cloud Build pipelines with proper caching and optimization for fast, efficient builds.
steps:
# Build step
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/myapp:$COMMIT_SHA', '.']
# Push to registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/myapp:$COMMIT_SHA']
# Deploy
- name: 'gcr.io/cloud-builders/gcloud'
args:
- 'run'
- 'deploy'
- 'myapp'
- '--image=gcr.io/$PROJECT_ID/myapp:$COMMIT_SHA'
- '--region=us-central1'
images:
- 'gcr.io/$PROJECT_ID/myapp:$COMMIT_SHA'
options:
machineType: 'N1_HIGHCPU_8'
logging: CLOUD_LOGGING_ONLY
steps:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- '-c'
- |
docker pull gcr.io/$PROJECT_ID/myapp:latest || exit 0
docker build \
--cache-from gcr.io/$PROJECT_ID/myapp:latest \
-t gcr.io/$PROJECT_ID/myapp:$COMMIT_SHA \
-t gcr.io/$PROJECT_ID/myapp:latest \
.
docker push gcr.io/$PROJECT_ID/myapp:$COMMIT_SHA
docker push gcr.io/$PROJECT_ID/myapp:latest
# Create trigger from GitHub
gcloud builds triggers create github \
--repo-name=my-repo \
--repo-owner=my-org \
--branch-pattern="^main$" \
--build-config=cloudbuild.yaml
# Create trigger with substitutions
gcloud builds triggers create github \
--repo-name=my-repo \
--repo-owner=my-org \
--branch-pattern="^main$" \
--build-config=cloudbuild.yaml \
--substitutions=_ENV=production,_REGION=us-central1
Use parallel steps:
steps:
# These run in parallel
- name: 'gcr.io/cloud-builders/npm'
id: 'install-frontend'
args: ['install']
dir: 'frontend'
waitFor: ['-']
- name: 'gcr.io/cloud-builders/npm'
id: 'install-backend'
args: ['install']
dir: 'backend'
waitFor: ['-']
# This waits for both
- name: 'gcr.io/cloud-builders/npm'
args: ['run', 'build']
waitFor: ['install-frontend', 'install-backend']
For detailed information, see:
npx claudepluginhub p/armanzeroeight-gcp-toolkit-plugins-gcp-toolkitDesigns and implements Google Cloud CI/CD pipelines using best practices, patterns, and references like Cloud Build YAML. For building pipelines, GCP architecture, or migrations.
Sets up Harness CI pipelines for container-native builds with test intelligence, caching, parallelization, and cloud/Kubernetes/VM infrastructure management.
Builds and operates CI/CD pipelines on GCP using Cloud Build, Cloud Deploy, Artifact Registry, SLSA provenance, and release gating with approval workflows.