Skip to content

Commit

Permalink
fix(gitlab-ci-template.yml): heuristic to spot manually-run pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
erikmd committed Jul 1, 2024
1 parent 448db62 commit 749b8bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.11
0.10.12
7 changes: 6 additions & 1 deletion gitlab-ci-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ prepare-artifacts:
echo "CI_COMMIT_BEFORE_SHA=$CI_COMMIT_BEFORE_SHA"
echo "CI_COMMIT_SHA=$CI_COMMIT_SHA"
declare -a DOCKER_KEEPER_CMDS
if [ "$CI_COMMIT_BEFORE_SHA" != "$CI_COMMIT_SHA" ]; then
# The previous latest commit present on a branch or tag.
# Is always `0000000000000000000000000000000000000000` for
# merge request pipelines, the first commit in pipelines for branches or tags,
# *or when manually running a pipeline*.
# Remark for testing: coqbot+gitlab-ci may run 2 pipelines (branch/pull request)
if [ "$CI_COMMIT_BEFORE_SHA" != "0000000000000000000000000000000000000000" ]; then
echo "Parsing commit message {|$CI_COMMIT_MESSAGE|}."
readarray -t lines < <(grep "\(^\|(\| \|;\)docker-keeper)\?:" <<< "$CI_COMMIT_MESSAGE")
for line in "${lines[@]}"; do
Expand Down

0 comments on commit 749b8bc

Please sign in to comment.