-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjob-creator.groovy
122 lines (121 loc) · 3.33 KB
/
job-creator.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
listView('1and1') {
description('All jobs from organization 1and1')
jobs {
regex('1and1-.*')
}
columns {
status()
weather()
name()
lastSuccess()
lastFailure()
lastDuration()
buildButton()
}
}
def projectNames = [
'1and1/bill-of-materials-maven-plugin',
'1and1/testlink-junit',
'1and1/foss-parent',
'1and1/ono-artifactory-shared',
'mfriedenhagen/logstash-logback-encoder'
]
def gitURL = 'git://github.com/'
def gitWEB = 'https://github.com/'
projectNames.each {projectName ->
mavenJob(projectName.replace('/', '-')) {
jdk('JDK 8')
logRotator(-1, 10, -1)
scm {
git {
remote {
url(gitURL + projectName + '.git')
}
configure {node ->
node / browser(class: "hudson.plugins.git.browser.GithubWeb") {
url(gitWEB + projectName + '.git')
}
}
branch('origin/master')
clean()
createTag(false)
}
}
triggers {
scm('*/15 * * * *')
cron('@daily')
}
mavenInstallation('Maven')
goals('--errors --show-version clean verify')
archivingDisabled(true)
runHeadless(true)
wrappers {
mavenRelease {
releaseGoals('-Dresume=false -DpreparationGoals=validate -DpushChanges=false -DlocalCheckout=true -Darguments="-Dgpg.skip=true -DaltDeploymentRepository=foo::default::file:///tmp/repo/" release:prepare release:perform')
selectAppendJenkinsUsername()
}
timeout {
absolute(30)
}
buildName('#${BUILD_NUMBER} ${GIT_BRANCH}')
}
publishers {
jacocoCodeCoverage()
extendedEmail('mfriedenhagen@gmail.com', '$DEFAULT_SUBJECT', '$DEFAULT_CONTENT')
}
configure {node ->
node / buildWrappers / 'org.jenkinsCi.plugins.projectDescriptionSetter.DescriptionSetterWrapper'() {
charset('UTF-8')
projectDescriptionFilename('target/jenkins-description.html')
}
}
}
}
projectNames.each {projectName ->
mavenJob(projectName.replace('/', '-') + '-branches') {
jdk('JDK 8')
logRotator(-1, 10, -1)
scm {
git {
remote {
url(gitURL + projectName + '.git')
}
configure {node ->
node / browser(class: "hudson.plugins.git.browser.GithubWeb") {
url(gitWEB + projectName + '.git')
}
}
branch('origin/gh-pages')
clean()
createTag(false)
strategy {
inverse()
}
}
}
triggers {
scm('*/15 * * * *')
cron('@daily')
}
mavenInstallation('Maven')
goals('--errors --show-version clean verify')
archivingDisabled(true)
runHeadless(true)
wrappers {
timeout {
absolute(30)
}
buildName('#${BUILD_NUMBER} ${GIT_BRANCH}')
}
publishers {
jacocoCodeCoverage()
extendedEmail('mfriedenhagen@gmail.com', '$DEFAULT_SUBJECT', '$DEFAULT_CONTENT')
}
configure {node ->
node / buildWrappers / 'org.jenkinsCi.plugins.projectDescriptionSetter.DescriptionSetterWrapper'() {
charset('UTF-8')
projectDescriptionFilename('target/jenkins-description.html')
}
}
}
}