Joined October 2019
·

flarup

Linux engineer
·

Posted to Get git current branch name over 1 year ago

git rev-parse --abbrev-ref HEAD and git symbolic-ref --short HEAD does not work in gitlab CI because it checks out a commit rather that a branch.

Instead use this environment variable
CI_COMMIT_REF_NAME=test

Achievements
1 Karma
0 Total ProTip Views