ZUREDEVOPS服务器管道:即使构成作业报告了“成功,

问题描述 投票:0回答:1
预计某些任务将失败。 幸运的是,我们为此有“持续性”。 但是,这导致该工作被标记为“成功持续下去”,这是可以的,除非它以橙色感叹号污染了舞台,从而使整个管道都带有橙色感叹号。

有一种方法可以说:“即使其组成的工作之一成功地解决了这个阶段,这阶段已经完全成功了”?

come以“成功”的阶段结果的任何方法,即使有一个成员的工作报告为“成功”?
azure tfs azure-pipelines azure-pipelines-yaml
1个回答
0
投票
.

- powershell: | # Define parameters $organization = "testorg" $project = "testproject" # Base64-encode the personal access token $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$(token)")) # Define the API URL $uri = "https://dev.azure.com/$organization/$project/_apis/build/builds/$(Build.BuildId)" + "?api-version=7.1" echo $uri # Define the body of the request $body = @{ status = "completed" result = "succeeded" } | ConvertTo-Json # Make the API request $response = Invoke-RestMethod -Uri $uri -Method Patch -Body $body -ContentType "application/json" -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} # Output the response $response

Stagea是成功的,整个构建都是成功的。

    

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.