I made this simple job that should be triggered only for tag created on test branch.
deploy_job:
stage: manual_deploy
script:
- echo "Deploying the project...!!!"
rules:
- if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_NAME == "test"'
when: manual # This makes the job manual
but when I create the tag by Gitlab UI , and I print the value of $CI_COMMIT_TAG
it is empty and the job does not trigger.