How to disable commit build trigger for a pipeline, while keeping it for another pipeline that uses the same repository in Github

Hi there,

We are using declarative pipelines in combination with the Github branch source plugin.
We have a repository that contains the application code, and the pipeline files for the build and the deployment.
We have configured 2 multibranch pipelines in Jenkins, one for the build and one for the deployment.
For the build pipeline, every branch is detected and created. This is also triggered on each commit and the correct branch will build. This is all fine and intended.

However, we also have a pipeline for the deployment. This only contains a few branches based on naming. This pipeline is also triggered for each commit on the branches, but we don’t want that. We want to be able to store the pipeline for the deployment with the codebase, but only trigger it manually.

I can’t seem to find the option to disable the automatic build triggers somewhere in the branch source config for Github. It is not an option to disable the webhooks on the repository as we do need the automatic triggers for the other pipeline.

I read about some solutions to abort the build if it was not triggered manually, but that seems a bit weird and inefficient.

What would be the proper way to do this?

Thanks!