Reputation: 141
I have one git repository where I have multiple folders, I want the Jenkins pipeline trigger when a specific folder gets changed.
How can I achieve this?
Upvotes: 1
Views: 2591
Reputation: 1821
You can configure your Jenkinsfile to do that.
Take a look on Jenkins Built-in Conditions. You need "changeset" here.
e.g.
stages {
stage('yourStage') {
when { changeset "FOLDERNAME/*"}
steps {
//.... what to do...
}
}
}
Upvotes: 2