3

i have a build pipeline i want to add mannual intervention in the pipeline and when that manual intervention is done the user can click on resume the pipeline but i want to do this in build pipeline.

i checked in this https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/manual-validation?view=azure-devops&tabs=yaml but it looks like we need to do using stage pipeline in release pipeline. but i want this to happen in build pipeline

ashish
  • 273
  • 1
  • 5
  • 16

2 Answers2

7

We seem have not such task for build pipeline, especially classic build pipeline.

If you want to add manual intervention in a build pipeline, you can try to set up this pipeline with YAML and add this run the Manual Validation task in an agentless job.

However, it might not be possible if you want to pause a running agent job in the build pipeline. Maybe you can try run the pipeline on a self-hosted agent with interactive mode.

[UPDATE]

You should use the Manual Validation task in an agentless job in the YAML pipeline, not in the classic build pipeline.

To set up an agentless job in the YAML pipeline, you need to set the value of 'pool' key to ne 'server'.

jobs:
- job: agentless-job
  pool: server

To view more details, you can see "Server jobs".

Bright Ran-MSFT
  • 5,190
  • 1
  • 5
  • 12
  • 4
    How do i add manual validation task in build pipeline when i tried that i get the error as Step references task 'ManualValidation' at version '0.179.0' which is not valid for the given job target. – ashish May 07 '21 at 05:05
  • Also how can i run an agentless job in build pipeline? – ashish May 07 '21 at 05:05
  • Hi @ashish, I have updated my answer with more details, please check it. – Bright Ran-MSFT May 11 '21 at 11:29
-1

To add a manual validation task in pipeline without creating a agent-less job you will need to define pool: server on the top of your steps. as below. I got this from by referring to canary deployments but have tested the same works for rolling deployment and probably other steps introduced in the pipeline. https://learn.microsoft.com/en-us/azure/devops/pipelines/process/deployment-jobs?view=azure-devops

pool: server    
steps:
- task: ManualValidation@0
  timeoutInMinutes: 1440 # task times out in 1 day
  inputs:
    notifyUsers: |
       youremailadress@hotmail.com
  instructions: 'Please validate the build configuration and resume'
  onTimeout: 'reject'
Ash
  • 1
  • 1