Working on Azure DevOps Pipeline to schedule a pipeline with two different parameters on different days according to the cron syntax.
Looking through the triggers, conditions, neither a schedule trigger nor a pipeline trigger seems to allow to pass a parameter value. Below are my parameters. Usually user trigger the pipeline with env of his choice, that doesn't have any problem,
parameters:
name: environment
displayName: Select the Suite to execute
default: Test
values:
- Test
- Dev
- QA
How do I add parameters to pipeline on a schedule with parameters ?
schedules:
cron: "0 1 10-15 * sat"
displayName: 7PM CST - SAT
branches: include:
- feature
cron: "0 3 25-31 * sat"
displayName: 9PM CST - SAT
branches: include:
- feature
Also checked options with strategy which doesn't satisfy my need, where I cannot have a new job to have the scheduled run with parameters as below, as this pipeline needs to be available for users to trigger based on the environment selection, if i specify these conditions jobs/tasks won't trigger.
pool: vmImage: '**'
strategy:
matrix:
Run1:
myvar: 12
Run2:
myvar: 14
Run3:
myvar: 16