// vars/buildPlugin.groovy
  def call(body) {
      // evaluate the body block, and collect configuration into the object
      def config = [:]
      body.resolveStrategy = Closure.DELEGATE_FIRST
      body.delegate = config
      body()
      // now build, based on the configuration provided
      node {
          git url: "https://github.com/jenkinsci/${config.name}-plugin.git"
          sh "mvn install"
          mail to: "...", subject: "${config.name} plugin build", body: "..."
} }
def config = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = config
body()

这几句如何理解?
附参考帖子:
http://wiki.jikexueyuan.com/project/groovy-introduction/domain-specific-languages.html


↙↙↙阅读原文可查看相关链接,并与作者交流