1

We have a classic release pipeline that we'd like to be able to trigger from a YAML build pipeline under certain conditions, these conditions aren't always going to be ones we can define using the existing CI trigger that can be defined for a release pipelines. We'd also prefer not to use a multi-stage pipeline as the access controls for the release pipeline wouldn't be easy to replicate for YAML files.

With that in mind is there a task that can be used in a YAML build pipeline in order to "manually" trigger a classic release pipeline? This obviously could be achieved via the Azure DevOps API but it would be a lot easier if a task was available.

MobileDev
  • 189
  • 7

1 Answers1

1

Based on your requirement, there is no built-in task can trigger release pipeline in Build Pipeline.

I suggest that you can use the Release Orchestrator task from Release Orchestrator.

Then you can use the task in YAML pipeline to trigger the release pipeline.

For example:

- task: releaseorchestrator@2
  displayName: 'Release Orchestrator'
  inputs:
    projectName: 123
    definitionName: 'New release pipeline'
    definitionStage: 'Stage 1'
    artifactVersion: test
    artifactTag: 1
Kevin Lu-MSFT
  • 20,786
  • 3
  • 19
  • 28