This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hudson.model.Hudson.instance.getView('<VIEW>').items.each() { | |
println it.fullDisplayName | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jenkins.model.Jenkins.instance.getViews().each { | |
if (it.name.startsWith("Team")) { | |
println it.name | |
if (it instanceof hudson.plugins.nested_view.NestedView) { | |
it.getViews().each { | |
println "- " + it.name | |
it.getItems().each { | |
println "--- " + it.name | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* returns the complete url to a build run | |
* e.g. http://localhost:8080/job/test/5/ | |
* @param build | |
* @return build run url as String | |
*/ | |
private String getAbsoluteBuildUrl(AbstractBuild build) { | |
return getBaseUrl() + build.getUrl(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String jobname = build.getParent().getDisplayName(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
EnvVars envVars; | |
envVars = build.getEnvironment(listener); | |
listener.getLogger().println("DEPLOY_ON-DEV: " + envVars.get("DEPLOY_ON_DEV")); | |
} catch (IOException e1) { | |
listener.getLogger().println(e1); | |
} catch (InterruptedException e1) { | |
listener.getLogger().println(e1); | |
} |