UpdateReleaseStageFlow - 更新发布阶段 YAML 配置

更新时间:
复制 MD 格式

适用版本

中心版、Region

服务接入点与授权信息

产品

资源

所需权限

应用交付

研发流程

读写

请求语法

中心版

PUT https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/releaseWorkflows/{releaseWorkflowSn}/releaseStages/{releaseStageSn}/yaml

Region

PUT https://{domain}/oapi/v1/appstack/apps/{appName}/releaseWorkflows/{releaseWorkflowSn}/releaseStages/{releaseStageSn}/yaml

请求头

参数

类型

是否必填

描述

示例值

x-yunxiao-token

string

个人访问令牌。

pt-0fh3****0fbG_35af****0484

请求参数

参数

类型

位置

是否必填

描述

示例值

organizationId

string

path

  • 是:中心版

  • 否:Region

组织 ID。

ec766e63xxxxx334d6exe671

appName

string

path

应用名。

my-app

releaseWorkflowSn

string

path

发布流程唯一序列号。

3f472a1xxxxxx6227bb85f787c

releaseStageSn

string

path

发布流程阶段唯一序列号。

6b4c53eexxxxxxxxxx35b29d002a81

-

object

body

更新发布阶段流程配置请求。

flow

string

body

流程配置,只支持更新 yaml 形式 的流程配置。

stages:
command_stage:
name: "执行命令"
jobs:
command_job:
name: "执行命令"
runsOn:
group: public/cn-beijing
container: build-steps-public-registry.cn-beijing.cr.aliyuncs.com/build-steps/alinux3:latest
steps:
command_step:
name: "执行命令"
step: "Command"
with:
run: "echo hello world\n"














请求示例

中心版

curl -X 'PUT' \
  'https://{domain}/oapi/v1/appstack/organizations/ec766e63xxxxx334d6exe671/apps/my-app/releaseWorkflows/3f472a1xxxxxx6227bb85f787c/releaseStages/6b4c53eexxxxxxxxxx35b29d002a81/yaml' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "flow": "stages:
  command_stage:
    name: "执行命令"
    jobs:
      command_job:
        name: "执行命令"
        runsOn:
          group: public/cn-beijing
          container: build-steps-public-registry.cn-beijing.cr.aliyuncs.com/build-steps/alinux3:latest
        steps:
          command_step:
            name: "执行命令"
            step: "Command"
            with:
              run: "echo hello world\n"
"
    }'

Region

curl -X 'PUT' \
  'https://{domain}/oapi/v1/appstack/apps/my-app/releaseWorkflows/3f472a1xxxxxx6227bb85f787c/releaseStages/6b4c53eexxxxxxxxxx35b29d002a81/yaml' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "flow": "stages:
  command_stage:
    name: "执行命令"
    jobs:
      command_job:
        name: "执行命令"
        runsOn:
          group: public/cn-beijing
          container: build-steps-public-registry.cn-beijing.cr.aliyuncs.com/build-steps/alinux3:latest
        steps:
          command_step:
            name: "执行命令"
            step: "Command"
            with:
              run: "echo hello world\n"
"
    }'

返回参数

参数

类型

描述

示例值

-

boolean

true

返回示例

true

错误码

访问错误码中心查看 API 相关错误码。