Reputation: 549
Guys Im currently working on an azure devops yaml pipeline, and i have a weird problem. For some reason on of my stages (marked in red) gets skipped, even tho it doesnt have any conditions definded. Heres the code of the stage and the previous stage:
Stage before the one that gets skipped:
Stage that gets skipped: Any Ideas what the problem could be?
Upvotes: 5
Views: 9470
Reputation: 41545
The reason is exactly what @James wrote, but to solve it you need to add the following condition (in the Upload_to_Target
stage):
condition: and(not(failed()), not(canceled()))
Upvotes: 4
Reputation: 698
The default behaviour if you don't specify a condition is to only run if all previous steps/jobs/tasks in the dependency tree have succeeded. And since you have a task in the previous steps which is skipping, the following stage is not running.
I think you can add something like this:
dependsOn: Download_from_source
condition: succeeded('Download_from_source')
Upvotes: 6