forked from linagora/james-jenkins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-github-tag
46 lines (42 loc) · 1.64 KB
/
build-github-tag
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
import groovy.transform.TupleConstructor
@TupleConstructor()
class TagOnRepo {
String repo
String tag
boolean latest = false
}
def tagsToBuild = [
new TagOnRepo(repo: 'linagora/james-project', tag: 'openpaas-1.4.0'),
new TagOnRepo(repo: 'linagora/james-project', tag: 'openpaas-1.4.1'),
new TagOnRepo(repo: 'linagora/james-project', tag: 'james-project-3.3.0'),
new TagOnRepo(repo: 'linagora/james-project', tag: 'james-project-3.4.0', latest: true),
new TagOnRepo(repo: 'linagora/james-project', tag: 'openpaas-1.4.8'),
new TagOnRepo(repo: 'linagora/james-project', tag: 'openpaas-1.5.1'),
new TagOnRepo(repo: 'linagora/james-project', tag: 'openpaas-1.6.5-rc1'),
new TagOnRepo(repo: 'linagora/james-project', tag: 'openpaas-1.7.0-rc2')
]
tagsToBuild.each {
def tagOnRepo = it
def repository = 'https://github.com/' + tagOnRepo.repo
job("build tag ${tagOnRepo.repo} ${tagOnRepo.tag}".replaceAll(/\//, '.')) {
githubProjectUrl(repository)
scm {
git {
remote {
url(repository + '.git')
}
branch('refs/tags/' + tagOnRepo.tag)
}
}
steps {
downstreamParameterized {
trigger('workflow', 'ALWAYS', false,
[buildStepFailure: 'FAILURE',
failure : 'FAILURE',
unstable : 'UNSTABLE']) {
predefinedProps([repoURL: repository, tagName: tagOnRepo.tag, originalBranch: "", isLatest: tagOnRepo.latest])
}
}
}
}
}