After upgrading to 2.307 and applying terminology changes (from 'master' to 'Built-In Node'), my builds stopped working with the following error message: ‘Jenkins’ doesn’t have label ‘master’
My Jenkinsfile looks like this:
node('master') {
dir('build') {
stage('Checkout') {
...
}
}
}
It helps to read the Changelog when upgrading. You can also just look up the node in Jenkins.
- Replace the term "master" with "controller" (for the main Jenkins application) or "built-in node", as appropriate. (pull 5425)
- Add migration code to only change the node name (e.g.
NODE_NAME
environment variable) and label of the built-in node after explicit migration by an administrator. New installations get the new node and and label immediately. (pull 5425)- Add the system property
jenkins.model.Jenkins.nodeNameAndSelfLabelOverride
to specify a different node name and label for the built-in node (e.g. for Configuration as Code use cases) than the one otherwise determined. This will not affect other uses of the node name, such as the URL to the built-in node (now/computer/(built-in)/
). (pull 5425)
Clarification:
If your Job definition, Pipeline definition, or Tool installer reference must be tied to the built-in node, it should use the label "built-in
" instead of "master
". Using the built-in (formerly master) node is strongly discouraged.
The new Nodes url (as shown below) is: ${JENKINS_URL}/computer/(built-in)/
instead of ${JENKINS_URL}/computer/(master)/
Alternative:
It is possible to continue the existing configuration by adding "master" as a label to the "built-in
" node.