GitLab と Bitbucket で Tekton Webhook を設定する


Red Hat Advanced Developer Suite - software supply chain 1.7

CI プロバイダーとして Tekton を選択した場合にソースコードリポジトリーに Webhook を追加する方法を学ぶ

Red Hat Advanced Developer Suite - software supply chain Documentation Team

概要

このドキュメントでは、CI プロバイダーとして Tekton を選択した場合に、ソースコードリポジトリーに Webhook を追加する手順を説明します。

はじめに

アプリケーションの作成時に CI プロバイダーとして Tekton を選択した場合は、GitLab や Bitbucket などのソースコードリポジトリーに Webhook を追加する必要があります。これらの Webhook は、コードが更新されると RHDH でパイプラインの実行を自動的にトリガーします。この統合により、パイプラインは常にコードの変更と同期します。

第1章 自動パイプライントリガーを有効にするために GitLab Webhook を設定する

GitLab で Webhook を設定し、コードの更新時に RHDH でパイプラインの実行を自動的にトリガーします。

前提条件

  • RHADS - SSC のインストールプロセス中に GitLab を統合している。
  • ソースリポジトリーがある。アプリケーションのソースコードを見つけるには、以下を実行します。

    1. RHDH プラットフォームで、Catalog に移動し、GitLab がリポジトリーホストとして設定されている適切なアプリケーションを選択します。
    2. Overview タブに移動し、View Source を選択して、アプリケーションのソースコードが格納されているリポジトリーを開きます。
  • Webhook URL とシークレットトークンがある。これらの認証情報は private.env ファイルにあります。

手順

  1. GitLab ソースリポジトリーに移動します。

    1. Red Hat Developer Hub プラットフォームで、Catalog に移動し、GitLab がリポジトリーホストとして設定されているアプリケーションを選択します。
    2. Overview タブに移動し、View Source を選択してソースコードのリポジトリーを開きます。
  2. Settings > Webhooks に移動します。
  3. URL フィールドに Webhook URL を入力します。
  4. Secret Token フィールドにシークレットトークンを入力します。
  5. Trigger セクションでは、次の操作を行います。

    1. Push events を選択します。
    2. Merge request events を選択します。
  6. Add Webhook をクリックします。

検証

  1. GitLab のソースリポジトリーへの変更をコミットします。
  2. RHDH の CI タブに移動します。
  3. コードプッシュに対してパイプラインの実行がトリガーされていることを確認します。

第2章 自動パイプライントリガーを有効にするために Bitbucket Webhook を設定する

コードの更新時に RHDH でパイプラインの実行を自動的にトリガーするように Bitbucket で Webhook を設定します。

前提条件

  • RHADS - SSC インストールプロセス中に Bitbucket を統合する必要があります。
  • ソースリポジトリーがある。アプリケーションのソースコードを見つけるには、以下を実行します。

    1. RHDH プラットフォームで、Catalog に移動し、Bitbucket がリポジトリーホストとして設定されている適切なアプリケーションを選択します。
    2. Overview タブに移動し、View Source を選択して、アプリケーションのソースコードが格納されているリポジトリーを開きます。
  • Webhook URL が必要です。これらの認証情報は private.env ファイルにあります。

手順

  1. Bitbucket ソースリポジトリーに移動します。
  2. Repository settings > Webhooks に移動し、Add webhook を選択します。
  3. Title フィールドに適切なタイトルを入力します。
  4. URL フィールドに Webhook URL を入力します。
  5. .Trigger セクションでは、次の操作を行います。

    1. Push を選択します。
    2. Merged を選択します。
  6. Save を選択します。

検証

  1. Bitbucket リポジトリーでコードを変更し、変更をプッシュします。
  2. RHDH の CI タブに移動します。
  3. コードの更新後にパイプライン実行がトリガーされていることを確認します。





改訂日時: 2025-09-08

法律上の通知

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2026 Red Hat
トップに戻る