Details
-
Type:
New Feature
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: groovy-label-assignment-plugin
-
Labels:None
-
Similar Issues:
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.
Code changed in jenkins
User: ikedam
Path:
src/main/java/jp/ikedam/jenkins/plugins/groovy_label_assignment/GroovyLabelAssignmentProperty.java
http://jenkins-ci.org/commit/groovy-label-assignment-plugin/9b780e3e3aefeaf5631facc920487af04403f545
Log:
Merge pull request #1 from greg2001/master
[FIXED JENKINS-27424] Expose the current Jenkins job to the Groovy script as "currentJob" variable
Compare: https://github.com/jenkinsci/groovy-label-assignment-plugin/compare/3fbdd41088f4...9b780e3e3aef