0

Is there an inbuilt variable in Azure pipeline that checks if a build has run more than once? I want to add a condition where i skip the step if build has run more than once.

enter image description here

As you can see ive commited once which triggered the build then i ran a manual build on the same commit hash so i want to know if there is a way to find out how many times it ran so i can add condition to one of my steps in the pipeline to skip if its > 1

I can see we have predefined variables for failed builds but how about normal build attempts

System.JobAttempt

and

System.StageAttempt
hello world
  • 385
  • 5
  • 24
  • So, it's not if the pipeline ran once, but if he ran once on a commit? I don't think it's available, you need to write a script to check.. – Shayki Abramczyk Jul 29 '21 at 06:54
  • maybe you'd like to have a look at [Batching CI runs](https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#batching-ci-runs) – Thomas Aug 01 '21 at 06:03

0 Answers0