Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Deploy to environments in any order

Ernesto Perez
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!
May 2, 2023

Hello everyone!

We have several Staging and Production environments, in different regions, and the versions we deploy on each region could be completely different.

In the image below you can find how we want to deploy:

Screenshot 2023-05-02 at 11.25.52.png

As you can see in the image above, for each version that is built in QA, we want to choose if we want to deploy it in Staging-EU, Staging-US, or Staging-Asia. And then, from that environment, it will go to its corresponding Production environment, in the same region.

Unfortunately, we are struggling to handle something like that with the current implementation of the Bitbucket Pipelines and Deployments, because it forces us to deploy/promote the same version in all Staging environments before going to Production.

In other words, it forces us to deploy in this way: QA -> Staging-EU -> Staging-US -> Staging-Asia -> Prod-EU -> Prod-US -> Prod-Asia.

The only solution we have found is to create a different branch per region: EU, US, ans Asia, and merge from master to those brances. But the solution looks over complicated to me.

Is there a better way to implement this?

Thanks in advance.



1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 3, 2023

Hi Ernesto and welcome to the community!

If you have a pipeline with seven steps (QA, and six for the Staging and Production regions), there is no way to skip a step in the middle and execute another one that comes after that.

We have a feature request for the ability to skip a step in a pipeline that you can vote for

(by selecting the Vote for this issue link) to express your interest:

Another approach would be to create three custom pipelines, one per region, each one with a Staging step and a Production step:

You could then trigger manually the custom pipeline for the region you want.

Custom Pipelines do not run automatically when you push to a certain branch. They can be triggered manually in one of the following ways:

  1. From the Pipelines page of the repo, option Run pipeline (near the top right corner)

  2. From the Branches page of the repo, if you select the three dots in Actions for a certain branch and then Run pipeline for a branch

  3. While viewing a commit's details from the Commits page > Run pipeline (at the right sidebar)

  4. You can also trigger a custom pipeline using our API:

  5. You can create a schedule for a custom pipeline:

Would something like that work for you?

Kind regards,

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events