# File-based filtering for Jenkins Multibranch Pipeline (similar to GitHub Actions paths filter)

**URL:** <https://community.jenkins.io/t/file-based-filtering-for-jenkins-multibranch-pipeline-similar-to-github-actions-paths-filter/35935>\
**Category:** Using Jenkins\
**Created:** [December 11, 2025, 1:42pm UTC](https://community.jenkins.io/t/file-based-filtering-for-jenkins-multibranch-pipeline-similar-to-github-actions-paths-filter/35935 "2025-12-11T13:42:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishgcek](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/krishgcek/32/11505_2.png) [@krishgcek](https://community.jenkins.io/u/krishgcek)\
**Post date:** [December 11, 2025, 1:42pm UTC](https://community.jenkins.io/t/file-based-filtering-for-jenkins-multibranch-pipeline-similar-to-github-actions-paths-filter/35935/1 "2025-12-11T13:42:43Z")

</div>

I’m using **Jenkins 2.516.3** with **GitHub Enterprise Server** and **Multibranch Pipeline** jobs.

In GitHub Actions, I can use file-based filters (e.g., the `paths` / `paths-ignore` filters) on both pushes and pull requests. This prevents runners from starting and avoids triggering workflows when irrelevant files are changed.

For a standard Jenkins Pipeline job, I know we can achieve something similar using **include/exclude regions**. However, for **Multibranch Pipeline jobs** , I can’t find any documentation or configuration options that allow setting file filters _per branch_ before triggering a build.

Does Jenkins support this kind of file filtering for Multibranch jobs?  
If so, how can it be configured? And if not, is there a recommended workaround?

---

<div class="post-metadata">

**Author:** ![Giovanni](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@Giovanni](https://community.jenkins.io/u/Giovanni)\
**Post date:** [December 12, 2025, 2:24pm UTC](https://community.jenkins.io/t/file-based-filtering-for-jenkins-multibranch-pipeline-similar-to-github-actions-paths-filter/35935/2 "2025-12-12T14:24:18Z")

</div>

You can achive that in a Multibranch pipeline as well by installing the following plugin: [Pipeline: Multibranch build strategy extension](https://plugins.jenkins.io/multibranch-build-strategy-extension/)

Once you get that installed and restart Jenkins just open the configuration of your multibranch pipeline and under Branch sources → Build Strategies you can add some new strategies.

Among them:

- Accept build by included regions strategy,
- Cancel build by excluded regions strategy.

You have other ones as well. I believe this should cover your use case.

---

<div class="post-metadata">

**Author:** ![krishgcek](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/krishgcek/32/11505_2.png) [@krishgcek](https://community.jenkins.io/u/krishgcek)\
**Post date:** [December 13, 2025, 1:05am UTC](https://community.jenkins.io/t/file-based-filtering-for-jenkins-multibranch-pipeline-similar-to-github-actions-paths-filter/35935/3 "2025-12-13T01:05:00Z")

</div>

Can I then control the region in the Jenkinsfile configured in the branch?

---

<div class="post-metadata">

**Author:** ![Giovanni](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@Giovanni](https://community.jenkins.io/u/Giovanni)\
**Post date:** [December 13, 2025, 5:12pm UTC](https://community.jenkins.io/t/file-based-filtering-for-jenkins-multibranch-pipeline-similar-to-github-actions-paths-filter/35935/4 "2025-12-13T17:12:07Z")

</div>

I am not quite sure you can do that in the Jenkins file. However, besides the strategies I have listed as examples, there are two other ones that look promising:

- Accept build by included regions strategy defined in file,
- Cancel build by excluded regions strategy defined in file.

I have not tested them and I cannot check the parameters they support but I guess they should allow you to define the regions in a file in the repository. this should allow you to control the regions based on the branch. Have a look, maybe these options support the Jenkinsfile s well.
