빌드 알림 입력 형식 참조 - AWS CodeBuild

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

빌드 알림 입력 형식 참조

CloudWatch 알림을 JSON 형식으로 전달합니다.

빌드 상태 변경 알림은 다음 형식을 사용합니다.

{ "version": "0", "id": "c030038d-8c4d-6141-9545-00ff7b7153EX", "detail-type": "CodeBuild Build State Change", "source": "aws.codebuild", "account": "123456789012", "time": "2017-09-01T16:14:28Z", "region": "us-west-2", "resources":[ "arn:aws:codebuild:us-west-2:123456789012:build/my-sample-project:8745a7a9-c340-456a-9166-edf953571bEX" ], "detail":{ "build-status": "SUCCEEDED", "project-name": "my-sample-project", "build-id": "arn:aws:codebuild:us-west-2:123456789012:build/my-sample-project:8745a7a9-c340-456a-9166-edf953571bEX", "additional-information": { "artifact": { "md5sum": "da9c44c8a9a3cd4b443126e823168fEX", "sha256sum": "6ccc2ae1df9d155ba83c597051611c42d60e09c6329dcb14a312cecc0a8e39EX", "location": "arn:aws:s3:::codebuild-123456789012-output-bucket/my-output-artifact.zip" }, "environment": { "image": "aws/codebuild/standard:5.0", "privileged-mode": false, "compute-type": "BUILD_GENERAL1_SMALL", "type": "LINUX_CONTAINER", "environment-variables": [] }, "timeout-in-minutes": 60, "build-complete": true, "initiator": "MyCodeBuildDemoUser", "build-start-time": "Sep 1, 2017 4:12:29 PM", "source": { "location": "codebuild-123456789012-input-bucket/my-input-artifact.zip", "type": "S3" }, "logs": { "group-name": "/aws/codebuild/my-sample-project", "stream-name": "8745a7a9-c340-456a-9166-edf953571bEX", "deep-link": "https://console.aws.amazon.com/cloudwatch/home?region=us-west-2#logEvent:group=/aws/codebuild/my-sample-project;stream=8745a7a9-c340-456a-9166-edf953571bEX" }, "phases": [ { "phase-context": [], "start-time": "Sep 1, 2017 4:12:29 PM", "end-time": "Sep 1, 2017 4:12:29 PM", "duration-in-seconds": 0, "phase-type": "SUBMITTED", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:12:29 PM", "end-time": "Sep 1, 2017 4:13:05 PM", "duration-in-seconds": 36, "phase-type": "PROVISIONING", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:13:05 PM", "end-time": "Sep 1, 2017 4:13:10 PM", "duration-in-seconds": 4, "phase-type": "DOWNLOAD_SOURCE", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:13:10 PM", "end-time": "Sep 1, 2017 4:13:10 PM", "duration-in-seconds": 0, "phase-type": "INSTALL", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:13:10 PM", "end-time": "Sep 1, 2017 4:13:10 PM", "duration-in-seconds": 0, "phase-type": "PRE_BUILD", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:13:10 PM", "end-time": "Sep 1, 2017 4:14:21 PM", "duration-in-seconds": 70, "phase-type": "BUILD", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:14:21 PM", "end-time": "Sep 1, 2017 4:14:21 PM", "duration-in-seconds": 0, "phase-type": "POST_BUILD", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:14:21 PM", "end-time": "Sep 1, 2017 4:14:21 PM", "duration-in-seconds": 0, "phase-type": "UPLOAD_ARTIFACTS", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:14:21 PM", "end-time": "Sep 1, 2017 4:14:26 PM", "duration-in-seconds": 4, "phase-type": "FINALIZING", "phase-status": "SUCCEEDED" }, { "start-time": "Sep 1, 2017 4:14:26 PM", "phase-type": "COMPLETED" } ] }, "current-phase": "COMPLETED", "current-phase-context": "[]", "version": "1" } }

빌드 단계 변경 알림은 다음 형식을 사용합니다.

{ "version": "0", "id": "43ddc2bd-af76-9ca5-2dc7-b695e15adeEX", "detail-type": "CodeBuild Build Phase Change", "source": "aws.codebuild", "account": "123456789012", "time": "2017-09-01T16:14:21Z", "region": "us-west-2", "resources":[ "arn:aws:codebuild:us-west-2:123456789012:build/my-sample-project:8745a7a9-c340-456a-9166-edf953571bEX" ], "detail":{ "completed-phase": "COMPLETED", "project-name": "my-sample-project", "build-id": "arn:aws:codebuild:us-west-2:123456789012:build/my-sample-project:8745a7a9-c340-456a-9166-edf953571bEX", "completed-phase-context": "[]", "additional-information": { "artifact": { "md5sum": "da9c44c8a9a3cd4b443126e823168fEX", "sha256sum": "6ccc2ae1df9d155ba83c597051611c42d60e09c6329dcb14a312cecc0a8e39EX", "location": "arn:aws:s3:::codebuild-123456789012-output-bucket/my-output-artifact.zip" }, "environment": { "image": "aws/codebuild/standard:5.0", "privileged-mode": false, "compute-type": "BUILD_GENERAL1_SMALL", "type": "LINUX_CONTAINER", "environment-variables": [] }, "timeout-in-minutes": 60, "build-complete": true, "initiator": "MyCodeBuildDemoUser", "build-start-time": "Sep 1, 2017 4:12:29 PM", "source": { "location": "codebuild-123456789012-input-bucket/my-input-artifact.zip", "type": "S3" }, "logs": { "group-name": "/aws/codebuild/my-sample-project", "stream-name": "8745a7a9-c340-456a-9166-edf953571bEX", "deep-link": "https://console.aws.amazon.com/cloudwatch/home?region=us-west-2#logEvent:group=/aws/codebuild/my-sample-project;stream=8745a7a9-c340-456a-9166-edf953571bEX" }, "phases": [ { "phase-context": [], "start-time": "Sep 1, 2017 4:12:29 PM", "end-time": "Sep 1, 2017 4:12:29 PM", "duration-in-seconds": 0, "phase-type": "SUBMITTED", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:12:29 PM", "end-time": "Sep 1, 2017 4:13:05 PM", "duration-in-seconds": 36, "phase-type": "PROVISIONING", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:13:05 PM", "end-time": "Sep 1, 2017 4:13:10 PM", "duration-in-seconds": 4, "phase-type": "DOWNLOAD_SOURCE", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:13:10 PM", "end-time": "Sep 1, 2017 4:13:10 PM", "duration-in-seconds": 0, "phase-type": "INSTALL", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:13:10 PM", "end-time": "Sep 1, 2017 4:13:10 PM", "duration-in-seconds": 0, "phase-type": "PRE_BUILD", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:13:10 PM", "end-time": "Sep 1, 2017 4:14:21 PM", "duration-in-seconds": 70, "phase-type": "BUILD", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:14:21 PM", "end-time": "Sep 1, 2017 4:14:21 PM", "duration-in-seconds": 0, "phase-type": "POST_BUILD", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:14:21 PM", "end-time": "Sep 1, 2017 4:14:21 PM", "duration-in-seconds": 0, "phase-type": "UPLOAD_ARTIFACTS", "phase-status": "SUCCEEDED" }, { "phase-context": [], "start-time": "Sep 1, 2017 4:14:21 PM", "end-time": "Sep 1, 2017 4:14:26 PM", "duration-in-seconds": 4, "phase-type": "FINALIZING", "phase-status": "SUCCEEDED" }, { "start-time": "Sep 1, 2017 4:14:26 PM", "phase-type": "COMPLETED" } ] }, "completed-phase-status": "SUCCEEDED", "completed-phase-duration-seconds": 4, "version": "1", "completed-phase-start": "Sep 1, 2017 4:14:21 PM", "completed-phase-end": "Sep 1, 2017 4:14:26 PM" } }