0

我在 Azure DevOps Server Version Dev17.M153.3 上运行的管道中有以下定义 在此处输入图像描述

保存更改后,我可以看到以下内容已添加到管道定义中

"approvals": [
          {
            "rank": 1,
            "isAutomated": false,
            "isNotificationOn": false,
            "approver": {
              "displayName": "Aouslender, Alexey",
              "url": "http://tdc1tfsapp01:8080/tfs/DefaultCollection/_apis/Identities/2d86d86b-fe02-4e22-aa53-4315cdb3821c",
              "_links": {
                "avatar": {
                  "href": "http://tdc1tfsapp01:8080/tfs/DefaultCollection/_apis/GraphProfile/MemberAvatars/win.Uy0xLTUtMjEtMzMwNDk4NzQ2Ni0xODkxMDA3NDIzLTI5MjUxNTc3OTctNDU4NDA1"
                }
              },
              "id": "2d86d86b-fe02-4e22-aa53-4315cdb3821c",
              "uniqueName": "DOMAIN\\PXXXXXX",
              "imageUrl": "http://tdc1tfsapp01:8080/tfs/DefaultCollection/_apis/GraphProfile/MemberAvatars/win.Uy0xLTUtMjEtMzMwNDk4NzQ2Ni0xODkxMDA3NDIzLTI5MjUxNTc3OTctNDU4NDA1",
              "descriptor": "win.Uy0xLTUtMjEtMzMwNDk4NzQ2Ni0xODkxMDA3NDIzLTI5MjUxNTc3OTctNDU4NDA1"
            },
            "id": 3546
          }
        ]

现在我正在使用导出选项导出管道。然后我删除管道并使用导出的 json 文件导入它。导入的管道缺少审批者定义,但我可以在导出的 json 中看到定义。

"preDeployApprovals": {
                "approvals": [
                    {
                        "rank": 1,
                        "isAutomated": false,
                        "isNotificationOn": false,
                        "approver": {
                            "displayName": "Aouslender, Alexey",
                            "url": "http://tdc1tfsapp01:8080/tfs/DefaultCollection/_apis/Identities/2d86d86b-fe02-4e22-aa53-4315cdb3821c",
                            "_links": {
                                "avatar": {
                                    "href": "http://tdc1tfsapp01:8080/tfs/DefaultCollection/_apis/GraphProfile/MemberAvatars/win.Uy0xLTUtMjEtMzMwNDk4NzQ2Ni0xODkxMDA3NDIzLTI5MjUxNTc3OTctNDU4NDA1"
                                }
                            },
                            "id": "2d86d86b-fe02-4e22-aa53-4315cdb3821c",
                            "uniqueName": "DOMAIN\\PXXXXXX",
                            "imageUrl": "http://tdc1tfsapp01:8080/tfs/DefaultCollection/_apis/GraphProfile/MemberAvatars/win.Uy0xLTUtMjEtMzMwNDk4NzQ2Ni0xODkxMDA3NDIzLTI5MjUxNTc3OTctNDU4NDA1",
                            "descriptor": "win.Uy0xLTUtMjEtMzMwNDk4NzQ2Ni0xODkxMDA3NDIzLTI5MjUxNTc3OTctNDU4NDA1"
                        },
                        "id": 3535
                    }
                ],
                "approvalOptions": {
                    "requiredApproverCount": null,
                    "releaseCreatorCanBeApprover": true,
                    "autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
                    "enforceIdentityRevalidation": false,
                    "timeoutInMinutes": 0,
                    "executionOrder": 1
                }
            }

在此处输入图像描述

我在这里遗漏了什么还是实际上是 Microsoft 错误?

4

1 回答 1

0

这是设计使然。不导入发布定义中的以下属性:代理队列、部署组、部署组标签、批准、变量组和秘密变量的值。

一般来说,如果在同一个团队项目中,您可以直接克隆发布定义。

于 2020-05-15T03:49:00.180 回答