Configuring Tekton webhooks in GitLab and Bitbucket
Learn how to add webhooks to your source code repository when you select Tekton as a CI provider.
Abstract
Preface
When you select Tekton as your CI provider while creating an application, you must add webhooks to your source code repository, for example, GitLab or Bitbucket. These webhooks automatically trigger pipeline runs in RHDH when code is updated. This integration ensures that your pipeline is always in sync with your code changes.
Chapter 1. Configuring GitLab Webhooks to enable automated pipeline triggers
Set up webhooks in GitLab to automatically trigger pipeline runs in RHDH upon code updates.
Prerequisites
- You must have integrated GitLab during the RHTAP install process.
You have a source repository. To locate your application’s source code:
- On the RHDH platform, navigate to the Catalog, select an appropriate application where GitLab is configured as the repository host.
- Go to the Overview tab and select View Source to open the repository where your application’s source code is housed.
-
You have a Webhook URL and a Secret Token. You can find these credentials in your
private.env
file.
Procedure
Navigate to your GitLab source repository.
- On the Red Hat Developer Hub platform, navigate to the Catalog, select an application where GitLab is configured as the repository host.
- Go to the Overview tab and select View Source to open the repository for your source code.
- Go to Settings > Webhooks.
- In the URL field, enter the webhook URL.
- In the Secret Token field, enter the secret token.
In the Trigger section:
- Select Push events.
- Select Merge request events.
- Click Add Webhook.
Verification
- Commit any change to the source repository in GitLab.
- Navigate to the CI tab in RHDH.
- Verify that a pipeline run is triggered for your code push.
Chapter 2. Configuring Bitbucket webhooks to enable automated pipeline triggers
Set up webhooks in Bitbucket to automatically trigger pipeline runs in RHDH upon code updates.
Prerequisites
- You must have integrated Bitbucket during the RHTAP install process.
You have a source repository. To locate your application’s source code:
- On the RHDH platform, navigate to the Catalog, select an appropriate application where Bitbucket is configured as the repository host.
- Go to the Overview tab and select View Source to open the repository where your application’s source code is housed.
-
You must have a Webhook URL. You can find these credentials in your
private.env
file.
Procedure
- Navigate to your Bitbucket source repository.
- Go to Repository settings > Webhooks, and select Add webhook.
- In the Title field, enter an appropriate title.
- In the URL field, enter the webhook URL.
. In the Trigger section:
- Select Push.
- Select Merged.
- Select Save.
Verification
- Make a code change in your Bitbucket repository and push the changes.
- Navigate to the CI tab in RHDH.
- Verify that a pipeline run is triggered after your code update.
Revised on 2025-04-30 03:56:12 UTC