# Multibranch pipeline with a single Jenkinsfile version

**URL:** <https://community.jenkins.io/t/multibranch-pipeline-with-a-single-jenkinsfile-version/33044>\
**Category:** Using Jenkins\
**Tags:** question, pipeline\
**Created:** [June 20, 2025, 12:09am UTC](https://community.jenkins.io/t/multibranch-pipeline-with-a-single-jenkinsfile-version/33044 "2025-06-20T00:09:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnbond](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gnbond/32/14559_2.png) [@gnbond](https://community.jenkins.io/u/gnbond)\
**Post date:** [June 20, 2025, 12:09am UTC](https://community.jenkins.io/t/multibranch-pipeline-with-a-single-jenkinsfile-version/33044/1 "2025-06-20T00:09:17Z")

</div>

Jenkins setup: 4.246.3, Gitea SCM

We have a declarative multi-branch pipeline (under an organisation), that is currently in a bit of a mess. There are a hundred or so branches, many of which are (theoretically) frozen.

We want to do some major cleanups to the Jenkins configuration and Jenkinsfile (add new stages, move to container builds, re-arrange agents, suppress building of archived branches, and the like). We can (and have) made some changes to the controller branch, and these changes are applied to any new branch or when a merge is done on an existing branch, but most existing branches don’t see those changes .

Is there a way to configure a multi branch pipeline to use a single Jenkinsfile version for all (or most) branches? Are there any other tricks I might try that doesn’t involve committing new Jenkinsfiles to a hundred branches every time we change something?

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [June 20, 2025, 12:22am UTC](https://community.jenkins.io/t/multibranch-pipeline-with-a-single-jenkinsfile-version/33044/2 "2025-06-20T00:22:34Z")

</div>

> **[Pipeline: Multibranch with defaults](https://plugins.jenkins.io/pipeline-multibranch-defaults/)**
>
> Enhances Pipeline plugin to handle branches better by automatically grouping builds from different branches. Supports enable one default pipeline

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [June 20, 2025, 12:25am UTC](https://community.jenkins.io/t/multibranch-pipeline-with-a-single-jenkinsfile-version/33044/3 "2025-06-20T00:25:45Z")

</div>

> **[Multibranch Pipeline Inline Definition](https://plugins.jenkins.io/inline-pipeline/)**
>
> Allows you to define a multibranch pipeline directly in Jenkins.

---

<div class="post-metadata">

**Author:** ![panicking](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/panicking/32/22039_2.png) [@panicking](https://community.jenkins.io/u/panicking)\
**Post date:** [June 21, 2025, 5:43am UTC](https://community.jenkins.io/t/multibranch-pipeline-with-a-single-jenkinsfile-version/33044/4 "2025-06-21T05:43:12Z")

</div>

Using remote Jenkins file provider plugin. I think for now it’s ok for my use case

---

<div class="post-metadata">

**Author:** ![gnbond](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gnbond/32/14559_2.png) [@gnbond](https://community.jenkins.io/u/gnbond)\
**Post date:** [June 21, 2025, 6:32am UTC](https://community.jenkins.io/t/multibranch-pipeline-with-a-single-jenkinsfile-version/33044/5 "2025-06-21T06:32:52Z")

</div>

Thanks Michael & Markus, those suggestions look like just the thing.

---

<div class="post-metadata">

**Author:** ![gnbond](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/gnbond/32/14559_2.png) [@gnbond](https://community.jenkins.io/u/gnbond)\
**Post date:** [August 17, 2025, 11:18am UTC](https://community.jenkins.io/t/multibranch-pipeline-with-a-single-jenkinsfile-version/33044/6 "2025-08-17T11:18:27Z")

</div>

I’ve used the Remote Jenkinsfile plugin and that is doing the job nicely.
