Groovy web console

subscribe to the feed Subscribe
to this
site

TestingFalsy

Published 3 weeks ago by Anonymous
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
JOBS = [
[name: 'A', disableAutomaticBuild: true],
[name: 'B', disableAutomaticBuild: false],
[name: 'C'],
]

for (job in JOBS) {
    System.out.println("NAME: ${job.name}")
    if(!job.disableAutomaticBuild) {
        System.out.println("Build is not disabled")
    } else {
        System.out.println("Build is disabled")
    }
}