cloud-build-basics

Teaches Google Cloud Build fundamentals including triggers, build history, and manual runs.

19.1k|1.5k|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/google/skills --skill cloud-build-basics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-build-basics
Source: https://github.com/google/skills/tree/main/skills/cloud/cloud-build-basics
Command: npx skills add https://github.com/google/skills --skill cloud-build-basics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Getting started with Google Cloud Build requires understanding core concepts like cloudbuild.yaml, build steps, artifacts, and triggers, plus navigating the console and gcloud CLI correctly. This Skill guides users through API enablement, viewing build history, creating a basic automated trigger, and manually running existing triggers without prior Cloud Build experience.

Core Features & Use Cases

  • Core Concepts & Setup: Explains cloudbuild.yaml, build steps, artifacts, and triggers, with prerequisites covering gcloud authentication, API enablement, and IAM permissions.
  • Trigger Creation Walkthrough: Step-by-step console workflow for creating a push-to-branch trigger, including region selection, repository connection, and configuration file location.
  • Manual Trigger Execution: Instructions for running triggers on demand via the console or gcloud builds triggers run, including substitution variable overrides.
  • Use Case: A developer new to Google Cloud wants to set up CI for a GitHub repository. The Skill walks them through enabling the Cloud Build API, creating a trigger on the main branch, and manually running it to verify the pipeline works.

Quick Start

Ask the assistant to walk you through creating and running your first Cloud Build trigger for a GitHub repository using the Google Cloud console and gcloud CLI.

Frequently Asked Questions about cloud-build-basics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Cloud Build trigger for a GitHub repository?

Navigate to the Cloud Build Triggers page in the console, click Create trigger, select Push to a branch as the event, connect your GitHub repository, set a branch pattern like ^main$, and point to your cloudbuild.yaml file. Alternatively, use gcloud builds triggers create github with the appropriate flags.

How do I manually run a Cloud Build trigger with gcloud?

Use gcloud builds triggers run <TRIGGER_NAME> --region=<REGION> --branch=<BRANCH> to invoke a trigger on demand. You can also override existing substitution variables with the --substitutions flag, then monitor the build with gcloud builds log <BUILD_ID>.

Can I add new substitution variables when running a Cloud Build trigger?

No, substitution variables are immutable at runtime. You can only override values for variables already defined in the trigger configuration; you cannot introduce new substitution keys during a manual run.

What permissions are needed to use Google Cloud Build?

You need the roles/cloudbuild.builds.editor role to create and run builds, plus roles/serviceusage.serviceUsageAdmin to enable the Cloud Build API. If the trigger uses a custom service account, you also need roles/iam.serviceAccountUser on that account.

Can I change the region of a Cloud Build trigger after creation?

No, region settings for triggers and builds are immutable after creation. You must choose the region deliberately during setup, or delete and recreate the trigger in the desired region.

When should I not use this Cloud Build basics guide?

This guide covers only fundamental trigger creation and manual runs. It does not address managing private worker pools or complex pipeline architectures, which require more advanced Cloud Build configuration.