lila
lila

Reputation: 463

find current git branch while running job in pipeline

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

Upvotes: 3

Views: 1213

Answers (1)

lila
lila

Reputation: 463

There is a predefined variable called CI_COMMIT_REF_NAME that contains branch name. for more info here

Upvotes: 4

Related Questions