6.20. Red Hat Quay API を使用したビルドの管理


ビルドは Red Hat Quay API を使用して管理できます。

手順

  1. GET /api/v1/repository/{repository}/trigger/ エンドポイントを使用して、指定したリポジトリーのトリガーをリストします。

    $ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/" \
      -H "Authorization: Bearer <your_access_token>"
    Copy to Clipboard Toggle word wrap

    出力例

    {"triggers": [{"id": "32ca5eae-a29f-46c7-8f44-3221ca417c92", "service": "custom-git", "is_active": false, "build_source": null, "repository_url": null, "config": {}, "can_invoke": true, "enabled": true, "disabled_reason": null}]}
    Copy to Clipboard Toggle word wrap

  2. POST /api/v1/repository/{repository}/trigger/{trigger_uuid}/activate エンドポイントを使用して、指定されたビルドトリガーをアクティブ化します。

    $ 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"
      }'
    Copy to Clipboard Toggle word wrap
  3. POST /api/v1/repository/{repository}/trigger/{trigger_uuid}/start エンドポイントを使用して、指定されたトリガーからビルドを手動で開始します。

    $ curl -X POST "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/start" \
      -H "Authorization: Bearer <your_access_token>" \
      -H "Content-Type: application/json" \
      -d '{
        "branch_name": "main",
        "commit_sha": "abcdef1234567890",
        "refs": "refs/heads/main"
      }'
    Copy to Clipboard Toggle word wrap
  4. GET /api/v1/repository/{repository}/trigger/{trigger_uuid}/builds エンドポイントを使用して、指定したトリガーが開始したビルドをリストします。

    $ 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>"
    Copy to Clipboard Toggle word wrap
  5. GET /api/v1/repository/{repository}/trigger/{trigger_uuid} エンドポイントを使用して、指定したビルドトリガーの情報を取得します。

    $ 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>"
    Copy to Clipboard Toggle word wrap
  6. PUT /api/v1/repository/{repository}/trigger/{trigger_uuid} エンドポイントを使用して、指定したビルドトリガーを更新します。

    $ 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}'
    Copy to Clipboard Toggle word wrap
  7. DELETE /api/v1/repository/{repository}/trigger/{trigger_uuid} エンドポイントを使用して、指定したビルドトリガーを削除します。

    $ 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>"
    Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat