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

Conditionally execute some steps in pipeline

Raul Guiu November 1, 2022

I am using semantic release in my pipeline.

 

if semantic release creates a new version:

1. create a new docker image

2. deploy to QA environment

My problem is that I dont know how to stop step 2 from happening. I can avoid the deployment if in the script adding a check, but the step will have been executed and it will look in the deployment section that a new deployment has been perform.

I tried with a "condition", but it is not good, because my rules to deploy can not be defined with a simple changeset.

My only current idea is to use tags to handle the deploys.

Any other suggestions.

1 answer

1 accepted

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 2, 2022

Hi Raul and welcome to the community!

I'm afraid that it is not possible to condition the execution of a step on anything other than a changeset at the moment. We have a feature request for what you are asking:

Since you'd be interested in that, I would suggest adding a comment and your vote to that feature request to further express your interest. You can also add yourself as a watcher if you'd like to get notified via email on updates.

In the meantime, apart from the ideas you already had, another suggestion I can make is to make this step manual by adding trigger: manual to the step. You can then manually trigger the second step if your condition is met. Please keep in mind though that if there is a third step after the second one, then the second one must complete in order for the third one to run.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events