Gates - Update
更新部署的入口。
PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/gates/{gateStepId}?api-version=7.1
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
gate
|
path | True |
integer (int32) |
门步骤 ID。 |
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
project
|
path | True |
string |
项目 ID 或项目名称 |
api-version
|
query | True |
string |
要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
comment |
string |
评论。 |
gatesToIgnore |
string[] |
要忽略的门的名称。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功作 |
安全性
oauth2
类型:
oauth2
流向:
accessCode
授权 URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
令牌 URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
作用域
名称 | 说明 |
---|---|
vso.release_execute | 授予读取和更新发布项目的功能,包括文件夹、发布、发布定义和发布环境,以及对新版本进行排队的能力。 |
示例
Ignore a gate
示例请求
PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/gates/{gateStepId}?api-version=7.1
{
"gatesToIgnore": [
"Query Work Items"
],
"comment": "Ignore gate"
}
示例响应
{
"id": 112,
"status": "inProgress",
"runPlanId": "d941f441-b188-4819-ac83-533cdf2e0c9d",
"startedOn": "2018-12-11T06:45:56.837Z",
"lastModifiedOn": "2018-12-11T06:45:57.523Z",
"ignoredGates": [
{
"name": "Query Work Items",
"lastModifiedOn": "2018-12-11T06:46:02.9243109Z"
}
]
}
定义
名称 | 说明 |
---|---|
Deployment |
|
Gate |
释放门的状态。 |
Gate |
|
Ignored |
|
Issue | |
Release |
|
Release |
|
Task |
发布任务的状态。 |
Workflow |
DeploymentJob
名称 | 类型 | 说明 |
---|---|---|
job |
所有已执行任务的父任务。 |
|
tasks |
作业中已执行的任务列表。 |
GateStatus
释放门的状态。
值 | 说明 |
---|---|
canceled |
门执行已取消。 |
failed |
门执行失败。 |
inProgress |
大门目前正在进行中。 |
none |
门没有状态集。 |
pending |
门处于挂起状态。 |
succeeded |
大门成功完成。 |
GateUpdateMetadata
名称 | 类型 | 说明 |
---|---|---|
comment |
string |
评论。 |
gatesToIgnore |
string[] |
要忽略的门的名称。 |
IgnoredGate
名称 | 类型 | 说明 |
---|---|---|
lastModifiedOn |
string (date-time) |
获取上次忽略门的日期。 |
name |
string |
忽略门的名称。 |
Issue
名称 | 类型 | 说明 |
---|---|---|
data |
object |
问题数据。 |
issueType |
string |
问题类型,例如错误、警告或信息。 |
message |
string |
问题消息。 |
ReleaseGates
名称 | 类型 | 说明 |
---|---|---|
deploymentJobs |
包含每个评估的入口作业详细信息。 |
|
id |
integer (int32) |
发布入口的 ID。 |
ignoredGates |
忽略的门的列表。 |
|
lastModifiedOn |
string (date-time) |
盖茨上次修改时间。 |
runPlanId |
string (uuid) |
运行入口的计划 ID。 |
stabilizationCompletedOn |
string (date-time) |
盖茨稳定完成日期和时间。 |
startedOn |
string (date-time) |
盖茨评估开始时间。 |
status |
释放门的状态。 |
|
succeedingSince |
string (date-time) |
成功执行所有入口的日期和时间。 |
ReleaseTask
名称 | 类型 | 说明 |
---|---|---|
agentName |
string |
执行任务的代理名称。 |
finishTime |
string (date-time) |
完成发布任务的时间。 |
id |
integer (int32) |
发布任务的 ID。 |
issues |
Issue[] |
执行任务时出现的问题列表。 |
lineCount |
integer (int64) |
日志发布任务包含的行数。 |
logUrl |
string |
任务的日志 URL。 |
name |
string |
任务的名称。 |
percentComplete |
integer (int32) |
任务执行完成预先完成。 |
rank |
integer (int32) |
发布任务的排名。 |
resultCode |
string |
任务的结果代码。 |
startTime |
string (date-time) |
发布任务的 ID。 |
status |
发布任务的状态。 |
|
task |
工作流任务参考。 |
|
timelineRecordId |
string (uuid) |
发布任务的时间线记录 ID。 |
TaskStatus
发布任务的状态。
值 | 说明 |
---|---|
canceled |
任务执行已取消。 |
failed |
任务执行失败。 |
failure |
任务执行失败。 |
inProgress |
任务当前正在进行中。 |
partiallySucceeded |
任务执行部分成功。 |
pending |
任务处于挂起状态。 |
skipped |
已跳过任务执行。 |
succeeded |
任务已成功完成。 |
success |
任务已成功完成。 |
unknown |
任务没有状态集。 |
WorkflowTaskReference
名称 | 类型 | 说明 |
---|---|---|
id |
string (uuid) |
任务标识符。 |
name |
string |
任务的名称。 |
version |
string |
任务的版本。 |