File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
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 @@ -17,8 +17,17 @@ echo "--- Downloading mappings.yml artifact"
17
17
mkdir -p build/
18
18
buildkite-agent artifact download build/mappings.yml build/
19
19
20
- echo " --- Fetching latest git tags"
21
- git fetch --tags
20
+ echo " --- :git: Checking and fetching git tags"
21
+ # if BUILDKITE_TAG is set, fetch the tags, and check that it's a valid tag
22
+ if [[ -n " ${BUILDKITE_TAG:- } " ]]; then
23
+ git fetch -v --tags
24
+ if ! git tag --list | grep -q " ^${BUILDKITE_TAG} $" ; then
25
+ echo " Tag ${BUILDKITE_TAG} does not exist"
26
+ exit 1
27
+ fi
28
+ else
29
+ echo " Not a tag build, skipping tag check"
30
+ fi
22
31
23
32
echo " --- Building :cloudformation: CloudFormation templates"
24
33
make build/aws-stack.yml
You can’t perform that action at this time.
0 commit comments