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

Is it possible to change pipeline step order from web UI not from file?

Optimum February 4, 2021

Hello, 
I have 3 servers 
1 - dev
2 - prod1
3 - prod2
Sometimes I need to deploy the changes to server 3 before server 2 and the opposite. Is there a possibility to change the order of steps?
I know I can do this by edition pipeline file but possibly there is an easy way.   

2 answers

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2021

Hi @Optimum,

I assume that you have 3 steps for deployment to each of the 3 servers?

I'm afraid that it is not possible to change the order of the steps in a way other than editing the bitbucket-pipelines.yml file.

One thing you could do is create a custom pipeline for deployment to server 2 and another custom pipeline for deployment to server 3. Custom pipelines don't run automatically, but you can trigger them manually for a specific commit, or run them on a schedule:

You can then run them in the order you like.

Kind regards,
Theodora

0 votes
ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2021

Hi Optimum, very interesting question. What blocks you from executing the deployments in the order you like?

And what is the reason to change the order of deployments to server 1 and 2?

Optimum-Web February 7, 2021

Hi tomk, well, sometimes I need to deploy micro service only to prod 2, and then to prod 1  , it's kindof blue green deployment

ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2021

Okay, I was already thinking about blue/green here but I didn't want to guess.

Can't you make the deployment order always blue/green so instead of server 1 and 2 which could be 1:blue and 2:green or 1:green and 2:blue to just have the first step to deploy to blue and the second step to deploy to green?

Then the pipeline would reflect your intention better.

Optimum-Web February 7, 2021

But currently I am not able to deploy step 3 before deploy step2. I have to complete previous "deploy" step 2. So, the question is why not allow to do it parallel. I don't know may be it's possible.

ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2021

You can run in parallel, but IIRC not if it is a deploy step. So there might be a limitation regarding that.

Optimum-Web February 7, 2021

> Okay, I was already thinking about blue/green here but I didn't want to guess.

> Can't you make the deployment order always blue/green so instead of server 1 and > 2 which could be 1:blue and 2:green or 1:green and 2:blue to just have the first >step to deploy to blue and the second step to deploy to green?

I would like to have it independent steps. Here is the flow:
Server 1 and Server 2 (both production) Server 1 is running (master), Second is not (fallback/slave). The flow is :  Upgrade server 2. Test. And connect it to balancer, it becomes master. Server1 disconnected, upgraded, becomes slave. Next time, Server 1 becomes master again. That's why I need deploy buttons for both. Or change the order of steps. 

ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2021

Sure as independent steps. One Step would be deploy blue, the other deploy green.

E.g. the first step is doing the deployment, the second step switches traffic and deploys on the other system.

Optimum-Web February 7, 2021

@ktomk  Not sure I get your idea, because anyway you have two dependent steps
I think the solution might be in setting server ip through environment settings for each stage. So I can set target server through ENV vars. Will try that. Thank you for you help @ktomk @Theodora Boudale    

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events