@@ -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
2217GCP_CLOUDRUN_SKAFFOLD_SOURCE=" gs://${GCP_PROJECT} -cloudrun-skaffold/source.tar.gz"
2318GCP_DELIVERY_PIPELINE=" ${MSP_SERVICE_ID} -${GCP_REGION} -rollout"
2419SHORT_SHA=" ${BUILDKITE_COMMIT: 0: 12} "
2520TAG=" ${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