Interview Prep/Jenkins/Architecture, executors & JENKINS_HOME

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.

All Jenkins questions Roadmap: Jenkins

More on Architecture, executors & JENKINS_HOME