$CI_COMMIT_TAG is empty when job runs
Hello,
I want to have the tag referencing the last git commit available in my gitlab-ci.yml script using $CI_COMMIT_TAG.
But every time the job runs the echo $CI_COMMIT_TAG does not display nothing. The $CI_COMMIT_TAG seems to be empty.
The following is my gitlab-ci.yml.
stages:
- build
build-dev:
stage: build
environment: development
only:
- master
script
- echo $CI_COMMIT_TAG
And toes are the git command I use to push with a tag.
git commit -am "test push with tag"
git tag test-tag
git push --tags origin master