groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Erick" <>
Subject Re: Help with Groovy syntax
Date Fri, 25 May 2018 13:47:05 GMT
Looks to me like stage is a method or a closure that takes 2 args. The first is a string, the
second is a closure.

Erick Nelson
Senior Developer – IT
HD Supply Facilities Maintenance
(858) 740-6523

From: Chris Fouts <>
Reply-To: "" <>
Date: Friday, May 25, 2018 at 6:35 AM
To: "" <>
Subject: Help with Groovy syntax

I'm 4 days old new to Groovy. I bought a book, but I just want to learn what this syntax mean
for today.

We use Groovy to run a Jenkins file in our Jenkins build. One stage has these statements in

    def mainScmDetails

    stage("Checkout") {

        mainScmDetails = checkout scm

        dir("some-dir") {

            git url: '<>',
credentialsId: 'some_creds', branch: 'develop'



Does this define a code block named mainScmDetails? Does the statement...

mainScmDetails = checkout scm two functions, namely, checkout and scm?


View raw message