All languages

Groovy

You're viewing a free preview. Sign in free to read every script.

Why this exists A closure is a block of code you can pass around, written { ... }. Almost everything that looks unusual in a Jenkinsfile — stages { }, steps { }, each { } — is a method that takes a closure. Once…

Groovy Basics: Maps, Closures and Iteration

Maps, closures and the collection methods (each, findAll, collect, groupBy) that replace most loops in Groovy, using a list of servers as the running example.

Sign in free to read this script, along with the rest of the library.

Sign in free