I have several release pipelines. I would like to add some conditions to the pipeline. I want to grab the version number for the Solution I am deploying, and the version that is already deployed, if the same, end/skip the deployment altogether. I know how to get the version numbers for the solutions, what I don't know is how to do the conditional testing.
Any help would be appreciated.
Thank you.
Hey @sperry1625 ,
Assuming you are using Azure DevOps, you can set conditions for when a job or task should run in a pipeline quite easily.
From a task
This is probably most applicable to you. Click on a task under a job in your pipeline, and from the task details sidebar, navigate to Control options, followed by Run this task.
From here you can change the default from Only when all previous tasks have succeeded to anything you like. I suspect in your case, you will want to set this to Custom conditions. You can read about what's possible in the docs under Specify conditions. You can use variables within conditions to dictate the pipeline flow using these conditions.
From a job
The same can be achieved at the job level by navigating to Additional options instead the details sidebar, followed by Run this job. From here you can change the default behavior as needed.
Maybe you could wrap your conditional deployment process tasks into a job and add the condition check at the job level?
I hope this helped.
Ryan
WarrenBelz
69
Most Valuable Professional
mmbr1606
51
Super User 2025 Season 1
MS.Ragavendar
36