Project

General

Profile

JenkinsGroovy » History » Version 4

Andreas Kohlbecker, 08/14/2013 10:44 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
println metadata.@count
27
metadata.versioning.versions.each{
28
	  println it
29
}
30
~~~
31 2 Andreas Kohlbecker
32
doc:
33
34
* http://groovy.codehaus.org/api/groovy/util/XmlSlurper.html
35 3 Andreas Kohlbecker
36
* http://www.ibm.com/developerworks/java/library/j-pg05199/