Skip to content

Commit 8b5987d

Browse files
authored
Fix GitLab release process (#5807)
## Summary of changes Fixes the fact that the gitlab pipeline that triggers on a tag push is currently broken ## Reason for change The GitLab pipeline is currently broken for release ## Implementation details We don't want to run the single-step testing stage on tag pushes, because there's no associated build, which causes that stage to fail. GitLab adds _implicit_ dependencies on previous stages which means that you can never run the manual tasks, and the release is blocked. ## Test coverage yeah.... I tested this in prod on the last release 🙈 ## Other details We want this in both v2 and v3, so will include it in the `release/2.x` branch
1 parent 399f252 commit 8b5987d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.gitlab-ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
stages:
33
- build
4-
- single-step-testing
54
- package
5+
- single-step-testing
66
- publish
77
- deploy
88
- benchmarks
@@ -45,13 +45,22 @@ wait-for-single-step-artifacts:
4545
stage: single-step-testing
4646
image: registry.ddbuild.io/images/ci_docker_base
4747
tags: [ "runner:docker" ]
48-
when: delayed
49-
start_in: 20 minutes
48+
rules:
49+
# We don't run on commit pushes, because there's no associated build
50+
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
51+
when: never
52+
- when: delayed
53+
start_in: 20 minutes
5054
script: |
5155
#Create a directory to store the files
5256
target_dir=artifacts
5357
mkdir -p $target_dir
5458
59+
if [ -z "${CI_COMMIT_BRANCH}" ]; then
60+
echo "Not on a branch, skipping test"
61+
exit 0
62+
fi
63+
5564
branchName="refs/heads/$CI_COMMIT_BRANCH"
5665
artifactName="ssi-artifacts"
5766

0 commit comments

Comments
 (0)