Expose the current Jenkins job to the Groovy script

XMLWordPrintable

      quoted from https://github.com/jenkinsci/groovy-label-assignment-plugin/pull/1:

      in your groovy script, you can reference the current Jenkins job as “currentJob” and do stuff like that:

      [‘windows’, ‘linux’, ‘mac’].find { currentJob.name.toLowerCase().contains(it) }
      

      The piece of code above would automatically assign the label according to the job name.

            Assignee:
            ikedam
            Reporter:
            ikedam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: