본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)22k · #10234

cloud-build-basics

하는 일

이 스킬은 빌드를 자동으로 실행하는 Google 서비스인 Google Cloud Build를 소개합니다. 처음 설정하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓Google Cloud Build를 처음으로 설정하고 싶을 때.
  • ✓빌드 트리거를 만들고 수동으로 실행해야 할 때.
  • ✓Google Cloud 프로젝트의 빌드 기록을 보고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/cloud-build-basics/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Google Cloud에서 Cloud Build를 설정하는 방법을 보여 주고, 첫 빌드를 수동으로 실행해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

API 켜기, 빌드 기록 페이지 확인, 기본 트리거 만들기처럼 핵심 단계를 순서대로 안내합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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
자주 묻는 질문

프라이빗 풀도 다루나요?

아닙니다. 기초만 다루며, 프라이빗 풀이나 복잡한 파이프라인은 다루지 않습니다.

어떤 역할이 필요한가요?

Cloud Build 빌드 편집자 역할이 필요하며, API를 켜려면 service usage admin 역할도 필요합니다.

먼저 API를 켜야 하나요?

네. 빌드를 실행하기 전에 프로젝트에서 Cloud Build API를 활성화해야 합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
22k
순위
#10234
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬