Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When a branch update bitbucket-pipeline.yml, which version is used to run the build on the branch?

Patrick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2018

I want to update my `bitbucket-pipelines.yml` file, but I don't want to update the main branch one in case I break something. 

 

I am under the impression that the master version of `bitbucket-pipelines.yml` is being used to build branches (which is fair)

Is it possible to tell pipelines to use the yml file from the branch instead of the master version?

1 answer

1 accepted

0 votes
Answer accepted
Tom Bradshaw
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2018

Hey @Patrick,

The `bitbucket-pipelines.yml` file that is used is the one on whatever commit triggered the build.

I.e. If you had a `bitbucket-pipelines.yml` on master that looked like

pipelines:
default:
- step:
script:
- echo "master"

and you push a commit to branch 'feature/my-cool-feature' that looks like

pipelines:
default:
- step:
script:
- echo "new pipeline configuration"

The resulting build from that commit will print "new pipeline configuration"

Patrick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 15, 2018

but how would the build be triggered if there no rule for the current branch in the master branch?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events