Exclude Paths from Triggering Builds

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Exclude Paths from Triggering Builds

Ven H
I have a repository in GitHub. This repository has a Jenkinsfile at the root which is the app project. There are 2 more folders / directories, one for Config project and one for Database project. Each has a jenkins file inside it. 

We have 3 Multibranch Jenkins Pipelines, since there are 3 different modules / projects. But all of them belong to the same GitHub repository. The challenge is that, if the DB developer modifies any file inside the DB directory, other jobs are also triggered (App and Config). If a file is changed in the Config directory, it triggers App and DB jobs, probably because all are inside the same repository.

Is there a way to ensure that any change in DB directory will only trigger the DB Multibranch job and not the App and Config and vice versa? Basically, I am looking for an option to exclude DB and Config directory from triggering App Build and so on. Please help.

Regards,
Venkatesh

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPp28er63DJce_-%2Be8c8_S_H2qd07cr20ZEndS8HYZfRgAc2%2Bg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Exclude Paths from Triggering Builds

jeremy mordkoff
Also interested in the answer. 

At the moment we scan the change log from the scm object and abort the pipeline (cleanly) if there is nothing of interest to that pipeline to build. I do not like this solution for multiple reasons. 

Our plan is to split our code into 3 repos .. one for each app and one for the product, with each of the app builds triggering a product build. The product build is really fast since all it does is update the tags in a helm chart to reference the latest builds. 

FYI...we use git submodules, which is why the scm object is not a good solution for us as it only has a list of changes made in the super-module. 

On Friday, February 12, 2021 at 7:08:58 AM UTC-5 [hidden email] wrote:
I have a repository in GitHub. This repository has a Jenkinsfile at the root which is the app project. There are 2 more folders / directories, one for Config project and one for Database project. Each has a jenkins file inside it. 

We have 3 Multibranch Jenkins Pipelines, since there are 3 different modules / projects. But all of them belong to the same GitHub repository. The challenge is that, if the DB developer modifies any file inside the DB directory, other jobs are also triggered (App and Config). If a file is changed in the Config directory, it triggers App and DB jobs, probably because all are inside the same repository.

Is there a way to ensure that any change in DB directory will only trigger the DB Multibranch job and not the App and Config and vice versa? Basically, I am looking for an option to exclude DB and Config directory from triggering App Build and so on. Please help.

Regards,
Venkatesh

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6ab91fd5-886e-4b7b-acd1-045c52088fbdn%40googlegroups.com.