此内容没有您所选择的语言版本。
Chapter 1. Configuring GitLab Webhooks to enable automated pipeline triggers
Set up webhooks in GitLab to automatically trigger pipeline runs in Red Hat Developer Hub (RHDH) upon code updates.
Prerequisites
- You must have integrated GitLab during the RHADS - SSC install process.
- You have selected the GitLab repository for your application in the RHDH platform catalog.
-
You have a Webhook URL and a Secret Token. You can find these credentials in your
private.envfile.
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.