Skip to content

Commit

Permalink
Fetch tags before checking them
Browse files Browse the repository at this point in the history
  • Loading branch information
mRoca committed Mar 29, 2020
1 parent 1c34e2c commit 2fc11fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ build:tag:
after_script:
- test -z "$CI_COMMIT_TAG" && echo "This is not a tag pipeline" && exit 1
- echo "Tag => $CI_COMMIT_TAG"
- git fetch -a
- git branch --contains $(git rev-list -n 1 ${CI_COMMIT_TAG}) --format "%(refname:short)" | grep '^origin/master$' || (echo "The tag is not present on master" && exit 1)
- git fetch -aq
- git branch -a --contains $(git rev-list -n 1 ${CI_COMMIT_TAG}) --format "%(refname:short)" | grep '^origin/master$' || (echo "The tag is not present on master" && exit 1)
- docker tag ${CI_REGISTRY_IMAGE}/fpm:${CI_COMMIT_REF_SLUG} ${CI_REGISTRY_IMAGE}/fpm:release-latest && docker push ${CI_REGISTRY_IMAGE}/fpm:release-latest
- docker tag ${CI_REGISTRY_IMAGE}/nginx:${CI_COMMIT_REF_SLUG} ${CI_REGISTRY_IMAGE}/nginx:release-latest && docker push ${CI_REGISTRY_IMAGE}/nginx:release-latest
only:
Expand Down

0 comments on commit 2fc11fd

Please sign in to comment.