The document discusses the Job DSL plugin for Jenkins, which allows configuring Jenkins jobs using Groovy scripts instead of the graphical user interface. It describes how to create job templates in Groovy, process them with the Job DSL plugin to generate jobs, and configure properties and views. Using the plugin saves time compared to manual configuration and allows treating job definitions as code.
19. Single Point of Configuration
evaluate(new File("/path/to/GlobalConfig.groovy"))
job {
name NewName
}
NewName = "Test_Job"
20. Iterate Over Job Names
def job_prefixes = ["CI", "NB"]
// Configure the jobs for each job preffix - "CI", "NB"
job_prefixes.each() {
def job_prefix = it
job {
name "${job_prefix}"
}
}