编辑
在流水线中编辑一个操作
要求权限范围: WORKSPACE
, EXECUTION_MANAGE
提醒
您不能更改现有操作的类型。要更改类型,请删除操作并重新添加。所有操作类型的模型都与添加操作示例中显示的模型相同。
资源URL
PATCH /workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/actions/:action_id
URL参数
名称 | 类型 | 描述 |
---|---|---|
action_id 必填 | Integer | 所需操作的数字ID |
domain 必填 | String | 工作区域名 |
pipeline_id 必填 | Integer | 所需流水线的数字ID |
project_name 必填 | String | 项目名称ID |
POST参数
在POST参数中,您可以将模型中列出的字段用于给定操作
示例
请求
PATCH https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5
JSON
{
"name": "Upload files to Live mirror",
"deployment_excludes": [
"/assets/",
"file.txt"
]
}
示例响应
HTTP
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
JSON
{
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5",
"html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/5/edit",
"id": 5,
"name": "Upload files to Live mirror",
"type": "FTP",
"trigger_time": "ON_EVERY_EXECUTION",
"last_execution_status": "SUCCESSFUL",
"input_type": "SCM_REPOSITORY",
"local_path": "/",
"remote_path": "",
"login": "pass",
"host": "localhost",
"port": "21",
"deployment_excludes": [
"/assets/",
"file.txt"
],
"pipeline": {
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2",
"html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2",
"id": 2,
"name": "Live mirror",
"on": "CLICK",
"refs": [
"refs/heads/master"
],
"last_execution_status": "SUCCESSFUL",
"last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08"
}
}