microsoft / azure-pipelines-yaml

Azure Pipelines YAML examples, templates, and community interaction
MIT License
1.19k stars 924 forks source link

Support for conditions in templates? #600

Open woeterman94 opened 9 months ago

woeterman94 commented 9 months ago

Same way as

- task: SonarQubeAnalyze@5
  condition: and(succeeded(), ${{parameters.runSonarQube}} )

I'd like to use conditions in templates

 - template: templates/build-server.yml
   condition: and(succeeded(), ${{parameters.runSonarQube}} )
          parameters:
            enableLongRunningTests: false
            runSonarQube: false
            runOwaspDependencyCheck: false
ismayilov-ismayil commented 9 months ago

Hi @woeterman94, thanks for asking. We are working on more prioritized issues at the moment, but will get back to this one soon. Meanwhile you can use parameter for conditional execution as described here