@@ -11,18 +11,14 @@ set -eux -o pipefail
11
11
# CI Variables
12
12
: " ${BUILDKITE_BUILD_NUMBER:? " BUILDKITE_BUILD_NUMBER is required" } "
13
13
: " ${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" } "
20
15
21
16
# Computed Variables
22
17
GCP_CLOUDRUN_SKAFFOLD_SOURCE=" gs://${GCP_PROJECT} -cloudrun-skaffold/source.tar.gz"
23
18
GCP_DELIVERY_PIPELINE=" ${MSP_SERVICE_ID} -${GCP_REGION} -rollout"
24
19
SHORT_SHA=" ${BUILDKITE_COMMIT: 0: 12} "
25
20
TAG=" ${SHORT_SHA} _${BUILDKITE_BUILD_NUMBER} "
21
+ COMMIT_MESSAGE=" $( git log -n 1 --pretty=format:' %s' ) "
26
22
# resource ids must be lower-case letters, numbers, and hyphens,
27
23
# with the first character a letter, the last a letter or a number,
28
24
# and a 63 character maximum
@@ -43,4 +39,4 @@ gcloud=$2
43
39
--source=" ${GCP_CLOUDRUN_SKAFFOLD_SOURCE} " \
44
40
--labels=" commit=${BUILDKITE_COMMIT} " \
45
41
--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