Cloud Build 알리미는 Cloud Run에서 컨테이너로 실행할 수 있는 Docker 이미지입니다. 구독자 애플리케이션에서 폴링될 때 Cloud Build 알리미는 푸시 구독을 사용하여 Slack 또는 SMTP 서버와 같이 구성된 서비스에 메시지를 전송합니다.
이 페이지에서는 Cloud Build 알리미를 간략히 설명합니다.
Cloud Build 알리미
Cloud Build는 빌드 메타데이터와 함께 모든 빌드 이벤트 업데이트를 cloud-builds 주제 또는 사용자 정의 주제의 Pub/Sub로 보냅니다. Cloud Build 알리미를 구성하여 해당 주제를 리슨하고 수신한 메시지를 필터링하며 Cloud Run을 통해 서비스에 메시지를 보내도록 구성할 수 있습니다.
모든 알리미는 Cloud Storage에 저장되는 구성에 대한 공통 YAML 사양을 사용합니다. 선택한 서비스에 인증이 필요한 경우 사용자 인증 정보가 Secret Manager에 저장됩니다.
Cloud Run은 메시지를 라우팅하고 알림을 서비스에 보냅니다.
다음 다이어그램은 Cloud Build가 Pub/Sub 및 Cloud Run과 같은 다른 Google Cloud 제품과 상호작용하여 알림을 전송하는 방법을 보여줍니다.
빌드 알림을 위한 Pub/Sub 주제
기본적으로 Cloud Build는 cloud-builds라는 Pub/Sub 주제가 있는 경우 해당 주제로 빌드 알림을 전송합니다. 맞춤 Pub/Sub 주제를 만들어 빌드 알림을 받을 수도 있습니다. 빌드 구성 파일에서 options.pubsubTopic 필드는 Cloud Build가 알림을 전송하는 주제의 이름을 정의합니다.
options.pubsubTopic를 비워 두면 Cloud Build는 해당 파일의 빌드에 대한 주제 이름으로 기본값 cloud-builds을 사용합니다. 따라서 cloud-builds 주제를 만들고 모든 빌드 구성 파일에서 options.pubsubTopic를 정의되지 않은 상태로 두면 해당 주제에 모든 빌드 알림이 수신됩니다.
options.pubsubTopic에서 맞춤 주제 이름을 지정하면 Cloud Build는 해당 빌드 구성 파일의 알림을 해당 주제에 전송합니다. 맞춤 주제 이름은 모든 빌드 알림을 동일한 주제에 게시하고 싶지 않은 경우에 유용합니다.
빌드 구성 파일에서 맞춤 주제 이름을 사용하는 경우 기본 Cloud Build 서비스 계정 이외의 서비스 계정에 roles/pubsub.publisher 역할을 할당해야 합니다.
프로젝트 전반의 Pub/Sub 주제에 빌드 알림 게시
빌드가 실행된 곳과 다른 프로젝트의 Pub/Sub 주제에 빌드 알림을 게시하려면 대상 프로젝트의 서비스 계정에 roles/pubsub.publisher 역할을 제공합니다.
예를 들어 프로젝트 A와 프로젝트 B가 있습니다. 서비스 계정 A를 사용하여 프로젝트 A에서 빌드를 실행하고 프로젝트 B의 Pub/Sub 주제에 빌드 알림을 게시하려고 합니다. 이렇게 하려면 다음 명령어를 실행하여 서비스 계정 A에 프로젝트 B의 roles/pubsub.publisher 역할을 부여하면 됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eCloud Build notifiers are Docker images that run as containers on Cloud Run, delivering build event updates and metadata via push subscriptions to services like Slack or SMTP.\u003c/p\u003e\n"],["\u003cp\u003eThese notifiers listen to the \u003ccode\u003ecloud-builds\u003c/code\u003e Pub/Sub topic, filter messages, and route notifications through Cloud Run to the configured service, using a common YAML configuration stored in Cloud Storage and credentials in Secret Manager.\u003c/p\u003e\n"],["\u003cp\u003eCloud Build maintains several deployable notifier images, including those for BigQuery, GitHub Issues, Google Chat, HTTP, Slack, and SMTP, all available in the \u003ccode\u003ecloud-build-notifiers\u003c/code\u003e repository.\u003c/p\u003e\n"],["\u003cp\u003eYou can use a provided setup script to automate the configuration of Cloud Build's supported notifiers.\u003c/p\u003e\n"],["\u003cp\u003eYou are able to create custom notifiers by utilizing the \u003ccode\u003ecloud-build-notifiers\u003c/code\u003e repository's library.\u003c/p\u003e\n"]]],[],null,["# Cloud Build notifiers are Docker images that can be run as\ncontainers on Cloud Run. When polled by a subscriber application,\nCloud Build notifiers use\n[push subscriptions](/build/docs/subscribe-build-notifications#push)\nto deliver messages to a configured service, such as Slack or an SMTP server.\n\nThis page provides an overview of Cloud Build notifiers.\n\nCloud Build notifiers\n---------------------\n\nCloud Build sends all build event updates, along with build metadata,\n[to Pub/Sub](/build/docs/subscribe-build-notifications) on either the\n`cloud-builds` topic or a user-defined topic. Cloud Build\nnotifiers can be configured to listen to that topic, filter the messages it\nreceives, and send messages to your service through Cloud Run.\n\nAll notifiers use a common YAML spec for configuration, stored in\nCloud Storage. If your chosen service requires authentication,\nthen its credentials are stored in Secret Manager.\nCloud Run routes your message and sends your notifications to\nyour service.\n\nThe following diagram shows how Cloud Build\ninteracts with other Google Cloud products, such\nas Pub/Sub and Cloud Run, to send\nnotifications:\n\nPub/Sub topics for build notifications\n--------------------------------------\n\nBy default, Cloud Build sends build notifications to\na Pub/Sub topic named `cloud-builds` if one exists. You can also\n[create a custom Pub/Sub topic](/pubsub/docs/create-topic) to\nreceive build notifications. In your build config file, the\n[`options.pubsubTopic`](/build/docs/build-config-file-schema#pubsub-topic)\nfield defines the name of the topic that\nCloud Build sends notifications to:\n\n- If `options.pubsubTopic` is left blank,\n then Cloud Build uses a default value of `cloud-builds` as the\n topic name for builds from that file. As a result, if you create a\n `cloud-builds` topic and leave `options.pubsubTopic` undefined in all your\n build config files, then that topic receives all your build notifications.\n\n- If you specify a custom topic name in `options.pubsubTopic`, then\n Cloud Build sends notifications for that build config\n file to that topic. Custom topic names are useful when you don't want\n all of your build notifications published to the same topic.\n\n When you use a custom topic name in a build config file, you must also\n assign the `roles/pubsub.publisher` role to any service account other than\n the default Cloud Build service account.\n\n| **Warning:** We strongly recommend using different topics for [Pub/Sub](/build/docs/automate-builds-pubsub-events?generation=2nd-gen) triggers and build notifications. Otherwise, notifications might turn into trigger events again, resulting in a recurring cycle of notifications and trigger events.\n\n**Publish build notifications to Pub/Sub topics across projects**\n\nTo publish build notifications to a Pub/Sub topic in a different\nproject from where the build was executed, provide the\n`roles/pubsub.publisher` role to the service account in the target project.\n\nFor example, you have Project A and Project B. You execute a build\nin Project A using Service Account A, and you want to publish build\nnotifications to a Pub/Sub topic in Project B. To do so,\nyou could grant Service Account A the `roles/pubsub.publisher` role in\nProject B by running the following command: \n\n gcloud projects add-iam-policy-binding ProjectB --member 'serviceAccount:ServiceAccountA' --role 'roles/pubsub.publisher'\n\nYou could then use a build config such as the following, which lets\nyou execute a build in Project A and publish build notifications to Project B: \n\n steps:\n - name: ubuntu\n args:\n - pwd\n serviceAccount: projects/ProjectA/serviceAccounts/ServiceAccountA\n options:\n pubsubTopic: projects/ProjectB/topics/CustomTopic\n logging: desired-logging-option\n\nSupported notifiers provided by Cloud Build\n-------------------------------------------\n\nCloud Build provides and maintains deployable notifier images in\nthe [`cloud-build-notifiers` repository](http://github.com/GoogleCloudPlatform/cloud-build-notifiers). The following table lists available\nnotifiers:\n\nTo learn more about how to configure each notifier, see the\ncorresponding page for each service:\n\n- [Configure BigQuery notifications](/build/docs/configuring-notifications/configure-bigquery)\n- [Configure GitHub Issues notifications](/build/docs/configuring-notifications/configure-githubissues)\n- [Configure Google Chat notifications](/build/docs/configuring-notifications/configure-googlechat)\n- [Configure HTTP notifications](/build/docs/configuring-notifications/configure-http)\n- [Configure Slack notifications](/build/docs/configuring-notifications/configure-slack)\n- [Configure SMTP notifications](/build/docs/configuring-notifications/configure-smtp)\n\nAutomate notification configuration\n-----------------------------------\n\nCloud Build provides a [setup script](https://github.com/GoogleCloudPlatform/cloud-build-notifiers/blob/master/setup.sh)\nthat you can use to automate notification configuration for\n[Cloud Build supported notifiers](/build/docs/configuring-notifications/notifiers#supported_notifiers).\n\nTo learn how to configure notifications for\n[Cloud Build supported notifiers](/build/docs/configuring-notifications/notifiers),\nsee [Automating configuration for notifications](/build/docs/configuring-notifications/automate).\n\nCreate your own notifier\n------------------------\n\nIn addition to notifiers maintained by Cloud Build,\nsuch as [Slack](/build/docs/configuring-notifications/configure-slack)\nor [SMTP](/build/docs/configuring-notifications/configure-smtp),\nyou can use the provided library in the [`cloud-build-notifiers` repository](http://github.com/GoogleCloudPlatform/cloud-build-notifiers) to create your own notifier.\n\nTo learn how to create your own notifier, see [Creating your own notifier](/build/docs/configuring-notifications/create-notifier).\n\nWhat's next\n-----------\n\n- Learn how to configure [BigQuery](/build/docs/configuring-notifications/configure-bigquery), [GitHub Issue](/build/docs/configuring-notifications/configure-githubissues), [Google Chat](/build/docs/configuring-notifications/configure-googlechat), [HTTP](/build/docs/configuring-notifications/configure-http), [Slack](/build/docs/configuring-notifications/configure-slack), or [SMTP](/build/docs/configuring-notifications/configure-smtp) notifiers.\n- Learn how to [automate configuration for\n notifications](/build/docs/configuring-notifications/automate).\n- Learn how to [create your own notifier](/build/docs/configuring-notifications/create-notifier)."]]