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 myrepositoryId = 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 = 'DSL45_'+projectName
|
16
|
println "executing "+projectName
|
17
|
if (versionCode == '4')
|
18
|
{
|
19
|
mavenJob(j_name) {
|
20
|
scm {
|
21
|
svn(URLSource)
|
22
|
}
|
23
|
triggers {
|
24
|
scm('H/10 * * * *')
|
25
|
snapshotDependencies(true)
|
26
|
}
|
27
|
jdk('Java 8')
|
28
|
goals(mvnGoal)
|
29
|
publishers {
|
30
|
deployArtifacts {
|
31
|
repositoryUrl (repositoryURL)
|
32
|
repositoryId (myrepositoryId)
|
33
|
uniqueVersion (true)
|
34
|
evenIfUnstable (true)
|
35
|
}
|
36
|
}
|
37
|
}
|
38
|
}
|
39
|
|
40
|
}
|