What are labels and label expressions?
BeginnerConceptArchitecture, executors & JENKINS_HOME
Answer
Labels are tags on nodes describing capabilities: OS, tools, size. Jobs request a label expression and the scheduler picks any online node with a free executor that matches.
agent { label 'linux && docker && !arm64' }
Operators: &&, ||, !, -> (implies), <->, and parentheses. Use capability labels (docker, jdk21) rather than hostnames, so you can replace machines without editing pipelines.
More on Architecture, executors & JENKINS_HOME
What are the main components of a Jenkins installation?BeginnerWhat is the difference between a node, an agent and an executor?BeginnerWhy should the built-in node have 0 executors?BeginnerWhat is `JENKINS_HOME` and what are its most important contents?BeginnerWhat happens if you lose the `secrets/` directory but keep `credentials.xml`?AdvancedHow does an agent communicate with the controller?Intermediate