File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -188,8 +188,6 @@ steps:
188
188
command : .buildkite/steps/publish.sh
189
189
agents :
190
190
queue : " ${BUILDKITE_AGENT_META_DATA_QUEUE}"
191
- env :
192
- BUILDKITE_GIT_FETCH_FLAGS : -v --prune --tags
193
191
concurrency_group : " aws-stack-publish"
194
192
concurrency : 1
195
193
concurrency_method : eager
Original file line number Diff line number Diff line change @@ -8,7 +8,22 @@ s3_upload_templates() {
8
8
aws s3 cp --content-type ' text/yaml' --acl public-read build/aws-stack.yml " s3://${BUILDKITE_AWS_STACK_TEMPLATE_BUCKET} /${bucket_prefix} aws-stack.yml"
9
9
}
10
10
11
+ echo " --- :git: Checking and fetching git tags"
12
+ # if BUILDKITE_TAG is set, fetch the tags, and check that it's a valid tag
13
+ if [[ -n " ${BUILDKITE_TAG:- } " ]]; then
14
+ git fetch -v --tags
15
+ if ! git tag --list | grep -q " ^${BUILDKITE_TAG} $" ; then
16
+ echo " ^^^ +++"
17
+ echo " Tag ${BUILDKITE_TAG} does not exist"
18
+ exit 1
19
+ fi
20
+ else
21
+ echo " Not a tag build, skipping tag check"
22
+ fi
23
+
24
+ echo " --- :aws: Checking template bucket is set"
11
25
if [[ -z " ${BUILDKITE_AWS_STACK_TEMPLATE_BUCKET} " ]]; then
26
+ echo " ^^^ +++"
12
27
echo " Must set an s3 bucket in BUILDKITE_AWS_STACK_TEMPLATE_BUCKET for publishing templates to"
13
28
exit 1
14
29
fi
@@ -17,9 +32,6 @@ echo "--- Downloading mappings.yml artifact"
17
32
mkdir -p build/
18
33
buildkite-agent artifact download build/mappings.yml build/
19
34
20
- echo " --- Fetching latest git tags"
21
- git fetch --tags
22
-
23
35
echo " --- Building :cloudformation: CloudFormation templates"
24
36
make build/aws-stack.yml
25
37
You can’t perform that action at this time.
0 commit comments