Skip to content

Commit 2d40d05

Browse files
committed
Move git tag check to the start
1 parent a27ed03 commit 2d40d05

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.buildkite/steps/publish.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ s3_upload_templates() {
88
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"
99
}
1010

11-
if [[ -z "${BUILDKITE_AWS_STACK_TEMPLATE_BUCKET}" ]]; then
12-
echo "Must set an s3 bucket in BUILDKITE_AWS_STACK_TEMPLATE_BUCKET for publishing templates to"
13-
exit 1
14-
fi
15-
16-
echo "--- Downloading mappings.yml artifact"
17-
mkdir -p build/
18-
buildkite-agent artifact download build/mappings.yml build/
19-
2011
echo "--- :git: Checking and fetching git tags"
2112
# if BUILDKITE_TAG is set, fetch the tags, and check that it's a valid tag
2213
if [[ -n "${BUILDKITE_TAG:-}" ]]; then
@@ -30,6 +21,17 @@ else
3021
echo "Not a tag build, skipping tag check"
3122
fi
3223

24+
echo "--- :aws: Checking template bucket is set"
25+
if [[ -z "${BUILDKITE_AWS_STACK_TEMPLATE_BUCKET}" ]]; then
26+
echo "^^^ +++"
27+
echo "Must set an s3 bucket in BUILDKITE_AWS_STACK_TEMPLATE_BUCKET for publishing templates to"
28+
exit 1
29+
fi
30+
31+
echo "--- Downloading mappings.yml artifact"
32+
mkdir -p build/
33+
buildkite-agent artifact download build/mappings.yml build/
34+
3335
echo "--- Building :cloudformation: CloudFormation templates"
3436
make build/aws-stack.yml
3537

0 commit comments

Comments
 (0)