简体   繁体   English

Azure DevOps 发布管道:想要失败但不失败不寻求批准的阶段

[英]Azure DevOps Release Pipeline: Want to Fail The Gate But Not Fail The Stage to not seek Approval

I have a "QA" stage that is deploying a package and after deployment I have a post-deployment approval.我有一个正在部署包的“QA”阶段,部署后我有一个部署后批准。 I only want to notify the "UAT Post-Deployment Approvers" group when the package is a Release package.当包是发布包时,我只想通知“UAT Post-Deployment Approvers”组。 I use GitVersion and Git Tags to tag a git commit.我使用 GitVersion 和 Git Tags 来标记 git commit。 The Build Pipeline will automatically build the source code with the Git Tag event because of the branch filter "refs/tags/v*" that I've added.由于我添加了分支过滤器“refs/tags/v*”,Build Pipeline 将使用 Git Tag 事件自动构建源代码。 I have also used Artifact Filters in the Release Pipeline before on the Pre-Approval side to prevent entry and triggering of the Pre-Approvers notification to look for "refs/tags/v*", but this time I want to filter on the Post-Approval side.我之前在 Pre-Approval 方面也使用了 Release Pipeline 中的 Artifact Filters 来防止进入和触发 Pre-Approvers 通知以查找“refs/tags/v*”,但这次我想在 Post 上进行过滤- 批准方。

Is there a way to filter AFTER a successful deployment, but BEFORE a Post-Approval so that the stage doesn't appear as a failure?有没有办法在成功部署之后但在批准后之前进行过滤,以便阶段不会显示为失败? Why?为什么? Because the deployment was successful and now I want the Release Pipeline to stop and not go any further.因为部署成功,现在我希望 Release Pipeline 停止并且不再继续。 I don't want to ask for a Post-Deployment Approval.我不想要求部署后批准。 The Gate check that I currently have (Azure Function) will return a failure and thus will fail the complete Stage (what I don't want) and then not ask for Post-Deployment Approval (which I do want).我目前拥有的 Gate 检查(Azure 函数)将返回失败,因此将导致整个阶段失败(我不想要的),然后不要求部署后批准(我确实想要)。 OR is there a way to set the Stage to success after a failed Gate Check?或者有没有办法在门检查失败后将舞台设置为成功? Or, maybe set a Jobless Agent step to stop processing?或者,可以设置一个 Jobless Agent 步骤来停止处理?

Is there a way to filter AFTER a successful deployment, but BEFORE a Post-Approval so that the stage doesn't appear as a failure?有没有办法在成功部署之后但在批准后之前进行过滤,以便阶段不会显示为失败? OR is there a way to set the Stage to success after a failed Gate Check?或者有没有办法在门检查失败后将舞台设置为成功?

For these issues,I am afraid that it is impossible to do this in azure devops.If you set Gates and Post-deployment approvals in the stage, stage will only show success if both conditions pass.If either of these two conditions does not pass, the stage will show as failure.对于这些问题,在azure devops中恐怕是做不到的。如果在stage中设置了Gates和Post-deployment审批,stage只有两个条件都通过才会显示成功。如​​果这两个条件都没有通过,阶段将显示为失败。

In addition,AFTER a successful deployment, but BEFORE a Post-Approval,the stage shows the status as Pending approval, not failure.此外,在成功部署之后,但在 Post-Approval 之前,阶段显示状态为待批准,而不是失败。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果启动命令不成功,是否可能使 Azure 发布管道阶段失败? - Is it possible to fail an Azure Release Pipeline stage if startup command is not successful? Azure Devops 发布流水线 - 匹配分支门 - Azure Devops Release Pipeline - Matching Branch Gate Azure DevOps 管道中的 AzureResourceManagerTemplateDeployment 失败 - AzureResourceManagerTemplateDeployment fail in Azure DevOps pipeline 使用多阶段的 Azure DevOps YAML 管道批准 - Azure DevOps YAML Pipeline Approval using Multi-Stage 当 Azure WebJob 无法启动/运行时,无法使 Azure DevOps Release Pipeline 失败 - Unable to fail Azure DevOps Release Pipeline when Azure WebJob fails to start/run 在 Azure DevOps 发布管道中是否可以有条件地请求批准? - In Azure DevOps release pipeline is it possible to request approval conditionally? Azure DevOps 管道失败:序列不是预期的 - Azure DevOps Pipeline Fail: Sequence was not expected 当 git 命令失败时,使 Azure Devops 管道中的任务失败 - Make tasks fail in Azure Devops pipeline when git commands fail 用于并行应用部署的 Azure DevOps 审批门 - Azure DevOps Approval Gate For Parallel App Deployments Azure DevOps 管道:在本地通过的测试在管道上失败 - Azure DevOps Pipeline: Tests that pass locally fail on the pipeline
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM