Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
| /** | |
| * On Issue Update Event | |
| * If Component is changed and only one component is assigned | |
| * then re-assigns the issue to the Component Lead | |
| */ | |
| import com.atlassian.crowd.embedded.api.User | |
| import com.atlassian.jira.bc.project.component.ProjectComponent | |
| import com.atlassian.jira.component.ComponentAccessor |
| def getFolderName() { | |
| def array = pwd().split("/") | |
| return array[array.length - 2]; | |
| } | |
| node(){ | |
| stage 'Get Folder Name' | |
| def foldername = getFolderName() | |
| print "${foldername}" |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
| test gist |