Closure vs Map

Closure vs Map


@Library("kcdc") _

// Closure
// Code at https://github.com/nrayapati/kcdc_2019_workshop/blob/master/vars/createGitBranchV1.groovy
createGitBranchV1 {
    source = "master"
    target = "test"
}

// Map
// Code at https://github.com/nrayapati/kcdc_2019_workshop/blob/master/vars/createGitBranchV2.groovy
createGitBranchV2([source: 'gh-pages', target: 'test'])