I've a Jenkinsfile in the master
branch of the repository with following code
pipeline {
agent any
stages {
stage('A') {
steps {
sh 'echo "Step A"'
}
}
}
}
Now I want to add a new stage B for which I created a git branch update/jenkinsfile
and in that branch the Jenkinsfile is now
pipeline {
agent any
stages {
stage('A') {
steps {
sh 'echo "Step A"'
}
}
stage('B') {
steps {
sh 'echo "Step B"'
}
}
}
}
How do I make Jenkins to use Jenkinsfile from branch B not from master in order to testing the change?