17
votes

Jenkins multibranch pipeline always performs checkout on master node. In my case I want to make my build on another node. My script in Jenkinsfile looks like this:

node('osx') {
    ...
}

I'm forced to checkout env.BRANCH on my node myself again to perform a build. It will be much better to perform pipeline build on selected node from the beginning, but I can not find how to do it.

1

1 Answers

3
votes

Do you have checkout scm in your Jenkinsfile on the branch?

Like so:

node('osx') {
    checkout scm
    ...
}