Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit bcc4367

Browse files
authored
msp/deploy: add 'author' and 'commit_message' annotations (#63108)
Add 'author' and 'commit_message' annotations on release ## Test plan CI
1 parent cff84a0 commit bcc4367

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

dev/ci/msp_deploy.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@ set -eux -o pipefail
1111
# CI Variables
1212
: "${BUILDKITE_BUILD_NUMBER:?"BUILDKITE_BUILD_NUMBER is required"}"
1313
: "${BUILDKITE_COMMIT:?"BUILDKITE_COMMIT is required"}"
14-
15-
# TODO: figure out a good way to capture author details
16-
# can contain only lowercase letters, numeric characters, underscores, and dashes.
17-
# All characters must use UTF-8 encoding, and international characters are allowed.
18-
# Keys must start with a lowercase letter or international character
19-
# : ${BUILDKITE_BUILD_AUTHOR_EMAIL:?"BUILDKITE_BUILD_AUTHOR_EMAIL is required"}
14+
: "${BUILDKITE_BUILD_AUTHOR:?"BUILDKITE_BUILD_AUTHOR is required"}"
2015

2116
# Computed Variables
2217
GCP_CLOUDRUN_SKAFFOLD_SOURCE="gs://${GCP_PROJECT}-cloudrun-skaffold/source.tar.gz"
2318
GCP_DELIVERY_PIPELINE="${MSP_SERVICE_ID}-${GCP_REGION}-rollout"
2419
SHORT_SHA="${BUILDKITE_COMMIT:0:12}"
2520
TAG="${SHORT_SHA}_${BUILDKITE_BUILD_NUMBER}"
21+
COMMIT_MESSAGE="$(git log -n 1 --pretty=format:'%s')"
2622
# resource ids must be lower-case letters, numbers, and hyphens,
2723
# with the first character a letter, the last a letter or a number,
2824
# and a 63 character maximum
@@ -43,4 +39,4 @@ gcloud=$2
4339
--source="${GCP_CLOUDRUN_SKAFFOLD_SOURCE}" \
4440
--labels="commit=${BUILDKITE_COMMIT}" \
4541
--deploy-parameters="customTarget/tag=${TAG}" \
46-
--annotations="commit=${BUILDKITE_COMMIT}"
42+
--annotations="commit=${BUILDKITE_COMMIT},author=${BUILDKITE_BUILD_AUTHOR},commit_message=${COMMIT_MESSAGE}"

0 commit comments

Comments
 (0)