Search code examples
azure-devopsazure-pipelinesazure-pipelines-release-pipelinemanual-testing

How to dynamically set deployment approvers?


  1. Can I dynamically set approvers for a deployment environment?
  2. Can I check the commits in the build pipeline for owners?

Some changes in a build need to be manually tested. We have some text in the change list's description that marks if the commit should be manually tested in a particular deployment environment. I want to set the post-approvers to the individuals that are responsible for their changes.


Solution

  • Can I dynamically set approvers for a deployment environment?

    For this issue , you can set approver through the Definitions - Update rest api.

    You can add approver in "postDeployApprovals" argument. For example:

    "postDeployApprovals": {
      "approvals": [
        {
          "rank": 1,
          "isAutomated": true,
          "isNotificationOn": false,
          "approver": {
            "id": "aeb95c63-4fac-4948-84ce-711b0a9dda97",
            "displayName": "xxx",
            "uniqueName": "[email protected]",
            "url": "https://vssps.dev.azure.com/xxx/_apis/Identities/aeb95c63-4fac-4948-84ce-711b0a9dda97",
            "imageUrl": "https://dev.azure.com/xxx/_api/_common/identityImage?id=aeb95c63-4fac-4948-84ce-711b0a9dda97"
          },
            "id": 0
          }
      ]
    }, 
    

    Can I check the commits in the build pipeline for owners?

    You can check commit on the build summary page:

    enter image description here