I have a Jenkinsfile for several multibranch pipelines in the same repository, and one thing I find frustrating is that all pipelines are triggered when I make any change, when often in reality only one pipeline actually needs to be triggered.
Is it possible, using a Jenkins file, to selectively include or exclude paths that will result in a build being triggered?
I'm thinking of something similar to below, but looking at the documentation I cannot see any reference to such a simple way of doing this. However, I'm new to Jenkins so I'm hoping that I'm missing something.
pipeline {
agent {
label 'Codebuild'
}
trigger {
include '/some/path
}
stages {
stage('Do the magic') {
steps {
script {
...do stuff here...
}
}
}
}
}