-1

Different variable group for different schedule trigger in Azure devops

1 Answers1

1

Do you mean you would like to use variable in different variable groups in different schedule triggered pipelines? What about go to UI->library->choose the specific variable group then choose pipeline permission and add the corresponding schedule pipelines. enter image description here Then add the variable group name in the schedule pipelines yml and you could output the value of variables in the group, for example if there is a variable named 'SomeNumber' in the variable group.

   variables:
    - group: MyVarGroup
    steps:
    - task: PowerShell@2
      inputs:
       targetType: 'inline'
       script: Write-Host "$(SomeNumber)"

But if you mean to add variable into the schedule trigger syntax, you can't use pipeline variables when specifying schedules in yml. You could see the official doc for more details.

If it is not what you want, please kindly specific your issue with the sample yaml, then I will try to do further investigation.

Antonia Wu-MSFT
  • 499
  • 2
  • 4
  • Thank you for your answer... Actually I want to add Variables through UI. I have 2 sets of variables and want to add each variable group for each schedule trigger. Can you help me on this... – Amrithavarshini Ramachandran Mar 21 '23 at 05:43