1
|
def myFile= new File("/tmp/DSL45/configuration.xml")
|
2
|
def parser=new XmlSlurper().parseText(myFile.text);
|
3
|
def allModule=parser.module.each {
|
4
|
def projectName= it.name as String
|
5
|
def sourceCodeType=it.source.@type
|
6
|
def versionCode = it.source.@version
|
7
|
def URLSource=it.source as String
|
8
|
def mvnGoal= it.goal as String
|
9
|
def hasSonar= it.sonar as String
|
10
|
def mail = it.mail as String
|
11
|
def repositoryId = it.deploy.RepositoryId as String
|
12
|
def repositoryURL = it.deploy.RepositoryURL as String
|
13
|
def nightly = it.nightly as String
|
14
|
def cron_node = it.cron as String
|
15
|
def j_name = 'DSL4_'+projectName
|
16
|
def template_name = "dnet4-svn-template"
|
17
|
println "executing "+projectName
|
18
|
if (versionCode == '4')
|
19
|
{
|
20
|
job(j_name) {
|
21
|
using(template_name)
|
22
|
scm
|
23
|
{
|
24
|
svn(URLSource)
|
25
|
}
|
26
|
steps {
|
27
|
maven mvnGoal
|
28
|
}
|
29
|
|
30
|
}
|
31
|
}
|
32
|
|
33
|
}
|