0
votes

I have an Azure DevOps pipeline that first builds a Function App and then deploys it through several different stages. My goal is not have the deployment stages trigger automatically.

When using releases, I'm able to achieve my goal by defining pre-deployment checks so that deployment to a stage is not triggered automatically. Since there is no option to make deployment of a stage 'manual after stage', I have to add an artefact filter to the relevant stage and set it to exclude *.

Unfortunately, stage triggers and artefact filters don't appear to exist for pipelines -

The environments that I can link to deployment stages do include approvals and checks, but these appear to be very limited and of no real use.

I have attempted to add a manual intervention, but despite the task being available through the pipeline assistant it does not work on a pipeline, only on a release.

How can I achieve my goal of manual deployment to stages of a pipeline?

Here is an example of my pipeline.

stages:
- stage: Publish
  displayName: Publish Function App
  jobs:
  - ...
- stage: Dev
  displayName: Deploy Dev
  jobs:
  - ...
- stage: Staging
  displayName: Deploy Staging
  jobs:
  - ...
- stage: Production
  displayName: Deploy Production
  jobs:
  - ...
1

1 Answers

0
votes

How can I achieve my goal of manual deployment to stages of a pipeline?

Sorry but as I know manual trigger for yaml pipeline is not available currently. This feature request has been submitted to our User Voice forum. You can vote it and track the issue there, so that you'll get notifications if there's any update.

According to your scenario, have you tried the approvals? If we set the approvals in Environments, the deployment job would stop and wait for manual approvals. The deployment to a stage won't really start until we manually approve that, I think it's also helpful for your scenario. Here's one blog which you can refer to.