7.24. trigger
ビルドトリガーを作成、リスト表示、管理します。
7.24.1. activateBuildTrigger リンクのコピーリンクがクリップボードにコピーされました!
指定したビルドトリガーをアクティブにします。
POST /api/v1/repository/{repository}/trigger/{trigger_uuid}/activate
認可: oauth2_implicit(repo:admin)
パスパラメーター
| タイプ | 名前 | 説明 | スキーマ |
|---|---|---|---|
| path |
trigger_uuid | ビルドトリガーの UUID | string |
| path |
repository | リポジトリーの完全パス (例: namespace/name) | string |
要求の body スキーマ (application/json)
| 名前 | 説明 | スキーマ |
|---|---|---|
|
config | 任意の json | object |
|
pull_robot | イメージのプルに使用するロボットの名前 | string |
レスポンス
| HTTP コード | 説明 | スキーマ |
|---|---|---|
| 201 | 作成に成功 | |
| 400 | Bad Request (不適切な要求) | |
| 401 | セッションが必要 | |
| 403 | 不正アクセス | |
| 404 | 結果が見つからない |
コマンドの例
7.24.2. listTriggerRecentBuilds リンクのコピーリンクがクリップボードにコピーされました!
指定したトリガーで開始するビルドをリスト表示します。
GET /api/v1/repository/{repository}/trigger/{trigger_uuid}/builds
認可: oauth2_implicit(repo:admin)
パスパラメーター
| タイプ | 名前 | 説明 | スキーマ |
|---|---|---|---|
| path |
trigger_uuid | ビルドトリガーの UUID | string |
| path |
repository | リポジトリーの完全パス (例: namespace/name) | string |
クエリーパラメーター
| タイプ | 名前 | 説明 | スキーマ |
|---|---|---|---|
| query |
limit | 返すビルドの最大数 | integer |
レスポンス
| HTTP コード | 説明 | スキーマ |
|---|---|---|
| 200 | 正常な呼び出し | |
| 400 | Bad Request (不適切な要求) | |
| 401 | セッションが必要 | |
| 403 | 不正アクセス | |
| 404 | 結果が見つからない |
コマンドの例
curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/builds?limit=10" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/builds?limit=10" \
-H "Authorization: Bearer <your_access_token>"
7.24.3. manuallyStartBuildTrigger リンクのコピーリンクがクリップボードにコピーされました!
指定したトリガーからビルドを手動で開始します。
POST /api/v1/repository/{repository}/trigger/{trigger_uuid}/start
認可: oauth2_implicit(repo:admin)
パスパラメーター
| タイプ | 名前 | 説明 | スキーマ |
|---|---|---|---|
| path |
trigger_uuid | ビルドトリガーの UUID | string |
| path |
repository | リポジトリーの完全パス (例: namespace/name) | string |
要求の body スキーマ (application/json)
ビルドトリガーをアクティベートするための実行パラメーター (任意)
| 名前 | 説明 | スキーマ |
|---|---|---|
|
branch_name | (SCM のみ) 指定した場合のビルドするブランチの名前。 | string |
|
commit_sha | (カスタムのみ) 指定されている場合は、git リポジトリーのチェックアウトに使用する ref/SHA1。 | string |
|
refs | (SCM のみ) 指定されている場合のビルドの ref。 |
レスポンス
| HTTP コード | 説明 | スキーマ |
|---|---|---|
| 201 | 作成に成功 | |
| 400 | Bad Request (不適切な要求) | |
| 401 | セッションが必要 | |
| 403 | 不正アクセス | |
| 404 | 結果が見つからない |
コマンドの例
7.24.4. getBuildTrigger リンクのコピーリンクがクリップボードにコピーされました!
指定したビルドトリガーの情報を取得します。
GET /api/v1/repository/{repository}/trigger/{trigger_uuid}
認可: oauth2_implicit(repo:admin)
パスパラメーター
| タイプ | 名前 | 説明 | スキーマ |
|---|---|---|---|
| path |
trigger_uuid | ビルドトリガーの UUID | string |
| path |
repository | リポジトリーの完全パス (例: namespace/name) | string |
レスポンス
| HTTP コード | 説明 | スキーマ |
|---|---|---|
| 200 | 正常な呼び出し | |
| 400 | Bad Request (不適切な要求) | |
| 401 | セッションが必要 | |
| 403 | 不正アクセス | |
| 404 | 結果が見つからない |
コマンドの例
curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
-H "Authorization: Bearer <your_access_token>"
7.24.5. updateBuildTrigger リンクのコピーリンクがクリップボードにコピーされました!
指定したビルドトリガーを更新します。
PUT /api/v1/repository/{repository}/trigger/{trigger_uuid}
認可: oauth2_implicit(repo:admin)
パスパラメーター
| タイプ | 名前 | 説明 | スキーマ |
|---|---|---|---|
| path |
trigger_uuid | ビルドトリガーの UUID | string |
| path |
repository | リポジトリーの完全パス (例: namespace/name) | string |
要求の body スキーマ (application/json)
ビルドトリガーを更新するオプション
| 名前 | 説明 | スキーマ |
|---|---|---|
|
enabled | ビルドトリガーが有効かどうか。 | boolean |
レスポンス
| HTTP コード | 説明 | スキーマ |
|---|---|---|
| 200 | 正常な呼び出し | |
| 400 | Bad Request (不適切な要求) | |
| 401 | セッションが必要 | |
| 403 | 不正アクセス | |
| 404 | 結果が見つからない |
コマンドの例
curl -X PUT "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
$ curl -X PUT "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
7.24.6. deleteBuildTrigger リンクのコピーリンクがクリップボードにコピーされました!
指定したビルドトリガーを削除します。
DELETE /api/v1/repository/{repository}/trigger/{trigger_uuid}
認可: oauth2_implicit(repo:admin)
パスパラメーター
| タイプ | 名前 | 説明 | スキーマ |
|---|---|---|---|
| path |
trigger_uuid | ビルドトリガーの UUID | string |
| path |
repository | リポジトリーの完全パス (例: namespace/name) | string |
レスポンス
| HTTP コード | 説明 | スキーマ |
|---|---|---|
| 204 | 削除済み | |
| 400 | Bad Request (不適切な要求) | |
| 401 | セッションが必要 | |
| 403 | 不正アクセス | |
| 404 | 結果が見つからない |
コマンドの例
curl -X DELETE "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X DELETE "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
-H "Authorization: Bearer <your_access_token>"
7.24.7. listBuildTriggers リンクのコピーリンクがクリップボードにコピーされました!
指定したリポジトリーのトリガーをリスト表示します。
GET /api/v1/repository/{repository}/trigger/
認可: oauth2_implicit(repo:admin)
パスパラメーター
| タイプ | 名前 | 説明 | スキーマ |
|---|---|---|---|
| path |
repository | リポジトリーの完全パス (例: namespace/name) | string |
レスポンス
| HTTP コード | 説明 | スキーマ |
|---|---|---|
| 200 | 正常な呼び出し | |
| 400 | Bad Request (不適切な要求) | |
| 401 | セッションが必要 | |
| 403 | 不正アクセス | |
| 404 | 結果が見つからない |
コマンドの例
curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/" \ -H "Authorization: Bearer <your_access_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/" \
-H "Authorization: Bearer <your_access_token>"