Reputation: 183
I'm setting up Gitlab CI job. I want to get the name of the current branch from a Gitlab CI job. How can I do this?
Upvotes: 4
Views: 3732
Reputation: 310993
In GitLab 9.0 and above, you have a predefined CI_COMMIT_REF_NAME
environment variable you can use in your jobs.
Upvotes: 5