How to configure deployment for a specific branch in different repositories

Artur Stępień February 28, 2018

My project structure which I can't change now is as follows:

Dev repository

  • master
  • feature1
  • feature2
  • feature...

Production repository

  • master

 

And the deployment flow is as follows:

  • Feature is merged into Dev repository master
  • PR is created from Dev repository master to Production repository master
  • Server git deployment script is triggered by a webhook.
  • Each instance is fetching changes from git

 

The question:

I want to change the deployment to a Bitbucket Deployments in a pipeline. I know I can make a pipeline step per branch, but can I do the same per repository? If no, how to archive Bitbucket Deployments the most reliable way.

1 answer

0 votes
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

Hey @Artur Stępień,

Bitbucket Pipelines enables you to configure different pipelines for specific branches. See for some examples here: https://confluence.atlassian.com/bitbucket/branch-workflows-856697482.html 

You can easily extend this workflow to integrate with Bitbucket Deployments as well, by adding 'deployment: production' to your deployment step. See this page for more info: https://confluence.atlassian.com/bitbucket/bitbucket-deployments-940695276.html 

Artur Stępień April 9, 2018

Thanks for the reference but The problem is that my master for production is on a separate repository. I need to use deployment:production only on production repository and stagging/testing deployment on a development repository (both production and development repositories have a master branch). So is there a way to write steps PER repository too.

Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2018

Right, I see. Unfortunately Bitbucket Pipelines only supports workflows per repository at the moment. 

There is a feature request open for this, you can check it here: https://bitbucket.org/site/master/issues/13232/trigger-downstream-builds 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events