Add branch variable when running custom pipeline against branch

Issue #18880 resolved
Jacin Tattersall created an issue

Currently, when running a custom pipeline against a branch, there is no variable (that I am aware of) containing the branch name. When doing this by going to Branches > Builds > Run pipeline for a branch it would be nice to have the branch name accessible as a variable in bitbucket-pipelines.yml

Comments (4)

  1. Aneita Yang staff

    Thanks for raising that.

    Our documentation is out of date. We will update this to avoid further confusion.

  2. Aneita Yang staff

    To clarify @Jacin Tattersall , the $BITBUCKET_BRANCH variable is available when you run the custom pipeline on a branch (i.e. when you navigate to a branch and run the pipeline). If you run the custom pipeline on a specific commit, the information about the branch is not available.

  3. Log in to comment