Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

how can i skip step according to conditions



step- #1

step- #2 

wanna to skip step 2 according to condition 

2 answers

as theres no out of the box solution from atlassian, what i did was something like:

- step:
- |
if something exists; then
        echo true > condition.txt
- condition.txt
- step:
- |
if $(cat condition.txt); then
exit 0
- do stuff
i know this is bullshit as it still has to go through `build setup` on each step which check for this condition, which takes time... but its still better than nothing
0 votes


Right now there isn't an option in the YAML to skip steps.

You could try marking the step as 'manual' if it's always going to be the last step, and just require it to be manually triggered.

Or you'll need to add your conditions to the start of the step. You can then just use 'exit 0' to finish the step early with a "successful" status and continue on with the pipeline.

You can also open a feature request for this here:!default.jspa



I am also facing the same issue. I have raised a suggestion.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events