Forums

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

Bitbucket pipelines

subramanian k
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!
October 7, 2021

Hey guys , 

I have the following branches 

a) development

b) stage

c) production 

I have written bitbucket pipeline for all the above 3 branches to do build and deployment to respective machines (dev vm ,stage vm , prod vm) . So, the pipeline code is same, just the final deployment happens on 3 vms .  Now , i have 3 pipelines.yml residing in all 3 branches and is working fine . 

But the issue is if i do a code merge thro pull request from dev to stage , even my pipelines.yml will be merged . How to avoid this problem .  Should i write the pipelines.yml outside of these branches ? If yes, where i need to put that ? in master ?  

Thanks

 

 

1 answer

0 votes
Jacob Brunson
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2021

Hi there! Thanks for reaching out to the Atlassian community.

I would recommend that all 3 branches should use the very same pipelines.yml file so that merging is not an issue.

Then to specify which machines each environment should deploy to, you can take advantage of Bitbucket deployments. You can configure environment-specific deployment variables such that each environment gets a different value. Your deployment scripts can use these variables for anything which varies between environments. That way they can all share the same pipelines.yml, but just use variables to specify options.

Hope this gets you started. You can read more about deployments and variables at these links:

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events