JenkinsGroovy » History » Version 5
Andreas Kohlbecker, 08/14/2013 11:04 PM
1 | 1 | Andreas Kohlbecker | |
---|---|---|---|
2 | # Groovy Scripts for Jenkins |
||
3 | |||
4 | |||
5 | You can evaluate groovy scripts in the Jenkins _Script Console_. |
||
6 | |||
7 | |||
8 | There are several plugins which can be _programmed_ with Groovy: |
||
9 | |||
10 | 4 | Andreas Kohlbecker | * [Groovy plugin](https://wiki.jenkins-ci.org/display/JENKINS/Groovy+plugin) |
11 | |||
12 | * [Dynamic Parameter Plug-in](https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Dynamic+Parameter+Plug-in) |
||
13 | |||
14 | * [Groovy Remote Control](http://groovy.codehaus.org/modules/remote/) |
||
15 | |||
16 | * [Scriptler plugin](https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin) |
||
17 | 1 | Andreas Kohlbecker | |
18 | |||
19 | |||
20 | ---- |
||
21 | |||
22 | Get all versions of an artifact from a maven repository |
||
23 | |||
24 | ~~~ |
||
25 | def metadata = new XmlSlurper().parse("http://wp5.e-taxonomy.eu/mavenrepo/eu/etaxonomy/cdm-server/maven-metadata.xml") |
||
26 | 5 | Andreas Kohlbecker | metadata.versioning.versions.version.each{ |
27 | println "> " + it |
||
28 | 1 | Andreas Kohlbecker | } |
29 | ~~~ |
||
30 | 2 | Andreas Kohlbecker | |
31 | doc: |
||
32 | |||
33 | * http://groovy.codehaus.org/api/groovy/util/XmlSlurper.html |
||
34 | 3 | Andreas Kohlbecker | |
35 | * http://www.ibm.com/developerworks/java/library/j-pg05199/ |