Chapter 3. Configuring GitLab Webhooks for automated pipeline triggers


Learn how to set up webhooks and secrets in GitLab to automatically trigger pipeline run in RHDH upon code updates.

Prerequisites

Procedure

  1. Retrieve Webhook URL and Secret Token:

    1. Log in to the OpenShift web console with Administrator privileges.
    2. Navigate to the rhtap project, expand Pipelines, and then select PipelineRuns.
    3. Locate the rhtap-pe-info-<> pipeline run, and then select the Logs tab.
    Note

    These logs contain the webhook URL and secret token required for GitLab configuration.

  2. Configure Webhook in GitLab:

    1. Within your GitLab repository, navigate to Settings > Webhooks.
    2. In the URL field, enter the webhook URL copied from Step 1.
    3. In the Secret Token field, enter the secret token copied from Step 1.
    4. In the Trigger section:

      1. Select Push events.
      2. Select Merge request events.
    5. Click Add Webhook.

Verification

  1. Push your code changes to the GitLab repository.
  2. Navigate to the CI tab in RHDH.
  3. Verify that a pipeline run is triggered for your code push.





Revised on 2024-07-15 21:00:30 UTC

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat