Reputation: 556
For Azure build pipelines, is there any way to specify a condition to run a certain step on specific days of a week?
Our requirement is run certain security scans only on one day in a week instead of running them during each build. Though the step can be excluded from CI builds run for pushes to branches using the usual conditions, I am not able to figure out how do we allow it to run only on a certain day.
Upvotes: 1
Views: 1443
Reputation: 41805
If the schedule build is the only schedule build you can add a custom condition to tun the task only in this build:
and(always(), eq(variables['Build.Reason'],'Schedule'))
Upvotes: 1