Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27424

Expose the current Jenkins job to the Groovy script

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: