Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)22k · #10234

cloud-build-basics

Ce qu’il fait

Cette skill présente Google Cloud Build, le service de Google qui exécute des builds automatiquement. Elle s'adresse aux personnes qui le mettent en place pour la première fois.

Quand l’utiliser

  • ✓Quand vous voulez mettre en place Google Cloud Build pour la première fois.
  • ✓Quand vous devez créer un déclencheur de build et le lancer manuellement.
  • ✓Quand vous voulez voir l'historique des builds d'un projet sur Google Cloud.

Lien du skill

https://github.com/google/skills/blob/main/skills/cloud/cloud-build-basics/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/google/skills/blob/main/skills/cloud/cloud-build-basics/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Montre-moi comment configurer Cloud Build sur Google Cloud et lancer manuellement mon premier build.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Elle passe en revue les essentiels dans l'ordre : activation de l'API, consultation de la page Historique des builds et création d'un déclencheur de base.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Cloud Build Basics

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:cloud-build-basics)" and append agent-skills/1.0 (skill:cloud-build-basics) to User-Agent headers.

Prerequisites

Before starting, ensure the following prerequisites are met:

  1. Google Cloud SDK: Ensure the Google Cloud SDK is installed and configured.
  2. Authentication: Authenticate the gcloud CLI:
    gcloud auth login
    gcloud auth application-default login
    
  3. Project ID: Know the target Google Cloud Project ID. Set the context:
    gcloud config set project <PROJECT_ID>
    
  4. Enable Cloud Build API: The Cloud Build API must be enabled for the project.
    gcloud services enable cloudbuild.googleapis.com
    
  5. Permissions: Ensure the user or service account has the necessary permissions, such as roles/cloudbuild.builds.editor and roles/serviceusage.serviceUsageAdmin (to enable the API).

Core Concepts

Cloud Build (GCB) is a serverless platform that executes your builds on Google Cloud. It translates your source code into deployable artifacts, such as Docker containers or Java archives.

Concept Description
cloudbuild.yaml The required configuration file that defines the build steps. It is written in YAML or JSON.
Build Steps A sequence of actions (steps) GCB performs. Each step runs a command inside a specific Docker container (the builder). Common builders include gcr.io/cloud-builders/gcloud, gcr.io/cloud-builders/docker, and custom containers.
Artifacts The output of the build, typically a container image pushed to Google Container Registry (GCR) or Artifact Registry (AR), or other deployable files.
Triggers Automation rules that invoke a build in response to an event, such as a push to a Git repository, a Pub/Sub message, or a manual request.

Navigation: Viewing Build History

The Cloud Build Build History page is the central place to monitor the status of past and ongoing builds.

  1. Open the Cloud Console: Navigate to the Google Cloud Console.
  2. Go to Cloud Build: Use the search bar or the navigation menu to find Cloud Build.
  3. Select Build History: In the left navigation pane, select History (or use the direct URL: https://console.cloud.google.com/cloud-build/builds).
  4. Review Builds:
    • Status: Check the status column (SUCCESS, FAILURE, WORKING, QUEUED).
    • Region: Use the region filter at the top to view builds that ran in a specific region (important for regional worker pools).
    • Logs: Click on a specific Build ID to view the detailed logs, execution steps, and build summary. This is crucial for debugging failed builds.

[!NOTE] If this is your first time visiting the page, you might see the "zero-state" experience, which offers options to run a sample build or create your first trigger (as noted in the cb-list-build-zero-state skill). Note that region settings for triggers and builds are immutable after creation and must be chosen deliberately.

Creating a Basic Automated Trigger

This process defines an automation rule to run a build whenever code is pushed to a specified Git branch.

Step 1: Start Trigger Creation

  1. Navigate to the Cloud Build Triggers page (https://console.cloud.google.com/cloud-build/triggers).
  2. Click Create trigger.

Step 2: Configure Trigger Settings

  1. Name: Provide a unique, descriptive name (e.g., github-main-branch-build).
  2. Region: Select the region where the trigger configuration will be stored (e.g., global or a specific regional endpoint). Note: Trigger and build region settings are immutable after creation and must be chosen deliberately.
  3. Event: Select the event type. For automated CI/CD, select Push to a branch.
  4. Source: Select the repository source:
    • Repository: Connect your source repository (GitHub, Bitbucket, Cloud Source Repositories, etc.). If needed, authorize the connection.
    • Repository Name: Select
Questions fréquentes

Couvre-t-elle les pools privés ?

Non. Elle ne couvre que les bases, pas les pools privés ni les pipelines complexes.

Quels rôles sont nécessaires ?

Il faut le rôle d'éditeur des builds Cloud Build, et le rôle d'administrateur de l'utilisation des services pour activer l'API.

Dois-je activer l'API au préalable ?

Oui. L'API Cloud Build doit être activée pour le projet avant que les builds puissent s'exécuter.

Détails

Description originale de l’auteur

Teaches the fundamentals of Cloud Build on Google Cloud. Covers core concepts, API enablement, console navigation to the Build History page, and the end-to-end workflow for creating and manually running a basic build trigger. Do not use for managing private pools or complex pipeline architectures.

repo: google/skills

Popularité

Étoiles GitHub
22k
Position au classement
#10234
Licence
Apache-2.0
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires