how can I find out branch name in a job that is running in the pipeline?
I tried git branch
all i get is
* (detached from <commit number>)
master
There is a predefined variable called CI_COMMIT_REF_NAME
that contains branch name. for more info here