---
title: "Jenkins Multibranch Pipelines | WebhookRelay"
meta:
  "og:description": "Trigger Jenkins Multibranch Pipeline builds from GitHub webhooks without exposing Jenkins — branch and pull request jobs via the Webhook Relay plugin."
  "og:title": "Jenkins Multibranch Pipelines"
  description: "Trigger Jenkins Multibranch Pipeline builds from GitHub webhooks without exposing Jenkins — branch and pull request jobs via the Webhook Relay plugin."
---

![Stripes](https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin-multibranch/images/stripes.svg)

Documentation

**Fundamentals**

# **Jenkins Multibranch Pipelines**

Trigger Jenkins Multibranch Pipeline builds from GitHub webhooks without exposing Jenkins — branch and pull request jobs via the Webhook Relay plugin.

**Multibranch Pipeline** projects work with the [Webhook Relay Jenkins plugin](https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin-multibranch/docs/tutorials/cicd/jenkins-plugin/) just like regular jobs — pushes and pull requests on GitHub trigger builds on a Jenkins that has **no public IP**. But they are configured differently from regular jobs, and that trips people up:

> **A Multibranch Pipeline has no _Build Triggers_ section.** Don't look for one — nothing is missing from your Jenkins. Branch and pull request jobs are created and triggered by the **branch source** reacting to the webhook events the plugin delivers, with no per-job trigger configuration at all.

This page shows the full setup for GitHub. When it's done, every push and pull request travels GitHub → your Webhook Relay bucket → the plugin → `/github-webhook/`, and:

- **Push to a branch** — the matching branch job builds.
- **Push a new branch** — a job for it is created and built automatically.
- **Open a pull request** — a `PR-<number>` job is created and built.

## [Requirements](#requirements)

- The Webhook Relay plugin installed, connected and with a webhook URL resolved — steps 1–3 of the [Jenkins Plugin tutorial](https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin-multibranch/docs/tutorials/cicd/jenkins-plugin/) (5 minutes).
- The [GitHub Branch Source](https://plugins.jenkins.io/github-branch-source/) plugin (**Manage Jenkins → Plugins → Available**, search for _GitHub Branch Source_). It listens on the same `/github-webhook/` endpoint the Webhook Relay plugin already delivers to, so the Webhook Relay configuration stays exactly the same.
- A repository with a `Jenkinsfile` on the branches you want built. The screenshots below use [webhookrelay/jenkins-multibranch-demo](https://github.com/webhookrelay/jenkins-multibranch-demo), a minimal public repo with a `Jenkinsfile` on every branch.

## [1. Create the Multibranch Pipeline](#_1-create-the-multibranch-pipeline)

From **New Item**, enter a name and pick **Multibranch Pipeline**:

![New Item — Multibranch Pipeline](https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin-multibranch/images/tutorials/jenkins/plugin-06-multibranch-new-item.png)

Under **Branch Sources**, add a **GitHub** source and set the **Repository HTTPS URL** to your repository (add a credential if it is private):

![Branch source — GitHub repository](https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin-multibranch/images/tutorials/jenkins/plugin-07-multibranch-branch-source.png)

Note the `Jenkinsfile` needs **no** `triggers { githubPush() }` block — that trigger is only for regular Pipeline jobs. Save, and Jenkins scans the repository once, creating a job for every branch that has a `Jenkinsfile`.

## [2. Add the webhook events](#_2-add-the-webhook-events)

In your repository's _Settings → Webhooks_, add the **Get Webhook URL** value from the plugin configuration as the Payload URL (content type `application/json`). One thing to watch: GitHub's default is to send _just the push event_. That covers branch builds — but if you also want pull request jobs, choose _Let me select individual events_ and tick **Pushes** and **Pull requests**.

## [3. Push, branch, open PRs](#_3-push-branch-open-prs)

That's it. Push a commit and the matching branch job builds; push a new branch and its job appears and builds on its own:

![Multibranch Pipeline — branch jobs](https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin-multibranch/images/tutorials/jenkins/plugin-08-multibranch-branches.png)

Pull requests get their own tab:

![Multibranch Pipeline — pull request jobs](https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin-multibranch/images/tutorials/jenkins/plugin-09-multibranch-prs.png)

The build page shows the webhook as the cause — _Push event to branch main_:

![Branch build caused by a push event through Webhook Relay](https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin-multibranch/images/tutorials/jenkins/plugin-10-multibranch-push-event.png)

Every delivery is also recorded on the bucket's [logs page](https://my.webhookrelay.com/buckets) together with the response Jenkins returned, so a webhook that didn't trigger a build is easy to trace.

## [GitLab and Bitbucket](#gitlab-and-bitbucket)

The same idea applies to the other providers, with one twist: the [GitLab Branch Source](https://plugins.jenkins.io/gitlab-branch-source/) and [Bitbucket Branch Source](https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/) plugins listen on their own endpoints (`/gitlab-webhook/post` and `/bitbucket-scmsource-hook/notify`) rather than on the plugin's preset paths. To deliver there, add an **internal output** to your bucket with the full destination URL (for example `http://localhost:8080/gitlab-webhook/post`) — when a bucket has an internal output, the plugin honours its path instead of the preset.

## [Troubleshooting](#troubleshooting)

| Symptom | Fix |
| --- | --- |
| Looking for a _Build Triggers_ section | There isn't one on multibranch projects — the branch source handles triggering. |
| Pushes build, pull requests don't | The GitHub webhook is only sending push events — tick **Pull requests** under _Let me select individual events_. |
| Webhook arrives (bucket log shows `200`) but nothing builds | The job's branch source must be **GitHub** (not plain _Git_), and the repository URL must match the pushed repo. |
| Nothing in the bucket logs | The repository webhook isn't pointing at the bucket's public URL — re-check the Payload URL against **Get Webhook URL**. |

## [Try it with Docker](#try-it-with-docker)

The [plugin repository](https://github.com/jenkinsci/webhook-relay-plugin) ships a ready-to-run demo Jenkins (see the [Jenkins Plugin tutorial](https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin-multibranch/docs/tutorials/cicd/jenkins-plugin/)); install the _GitHub Branch Source_ plugin in it and follow the steps above against a fork of [jenkins-multibranch-demo](https://github.com/webhookrelay/jenkins-multibranch-demo).

Did this page help you?