第 24 章 触发器
创建、列出和管理构建触发器。
24.1. activateBuildTrigger 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
激活指定的构建触发器。
POST /api/v1/repository/{repository}/trigger/{trigger_uuid}/activate
授权: oauth2_implicit (repo:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
trigger_uuid | 构建触发器的 UUID | 字符串 |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
请求正文模式(application/json)
| 名称 | 描述 | 模式 |
|---|---|---|
|
需要配置 | 任意 json。 | 对象 |
|
pull_robot | 用于拉取镜像的机器人名称。 | 字符串 |
响应
示例命令
$ curl -X POST "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/activate" \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"config": {
"branch": "main"
},
"pull_robot": "example+robot"
}'