diff --git a/dev/ci/msp_deploy.sh b/dev/ci/msp_deploy.sh index 36d4e86b7267..22b7784cd56d 100755 --- a/dev/ci/msp_deploy.sh +++ b/dev/ci/msp_deploy.sh @@ -11,18 +11,14 @@ set -eux -o pipefail # CI Variables : "${BUILDKITE_BUILD_NUMBER:?"BUILDKITE_BUILD_NUMBER is required"}" : "${BUILDKITE_COMMIT:?"BUILDKITE_COMMIT is required"}" - -# TODO: figure out a good way to capture author details -# can contain only lowercase letters, numeric characters, underscores, and dashes. -# All characters must use UTF-8 encoding, and international characters are allowed. -# Keys must start with a lowercase letter or international character -# : ${BUILDKITE_BUILD_AUTHOR_EMAIL:?"BUILDKITE_BUILD_AUTHOR_EMAIL is required"} +: "${BUILDKITE_BUILD_AUTHOR:?"BUILDKITE_BUILD_AUTHOR is required"}" # Computed Variables GCP_CLOUDRUN_SKAFFOLD_SOURCE="gs://${GCP_PROJECT}-cloudrun-skaffold/source.tar.gz" GCP_DELIVERY_PIPELINE="${MSP_SERVICE_ID}-${GCP_REGION}-rollout" SHORT_SHA="${BUILDKITE_COMMIT:0:12}" TAG="${SHORT_SHA}_${BUILDKITE_BUILD_NUMBER}" +COMMIT_MESSAGE="$(git log -n 1 --pretty=format:'%s')" # resource ids must be lower-case letters, numbers, and hyphens, # with the first character a letter, the last a letter or a number, # and a 63 character maximum @@ -43,4 +39,4 @@ gcloud=$2 --source="${GCP_CLOUDRUN_SKAFFOLD_SOURCE}" \ --labels="commit=${BUILDKITE_COMMIT}" \ --deploy-parameters="customTarget/tag=${TAG}" \ - --annotations="commit=${BUILDKITE_COMMIT}" + --annotations="commit=${BUILDKITE_COMMIT},author=${BUILDKITE_BUILD_AUTHOR},commit_message=${COMMIT_MESSAGE}"