Project

General

Profile

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 =  'DSL4_'+projectName  
16
        def template_name = "dnet4-svn-template"
17
        println "executing "+projectName        
18
        if (versionCode == '4')
19
        {        
20
          mavenJob(j_name) {    
21
            scm {
22
                svn(URLSource)
23
            }
24
            triggers {
25
               scm('H/10 * * * *')
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
}
(5-5/6)