-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
60 lines (53 loc) · 1.81 KB
/
Jenkinsfile
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
#!groovy
@Library('metaborg.jenkins.pipeline') _
gradlePipeline(
upstreamProjects: {
Map<String, String> props = readProperties(file: 'repo.properties')
def repoIncludeOrUpdate = [:]
def customJobPrefix = [:]
def customBranch = [:]
props.each { key, value ->
if(key.endsWith(".jenkinsjob")) {
def index = key.lastIndexOf(".")
if(index != -1) {
def name = key.substring(0, index)
customJobPrefix[name] = value
}
} else if(key.endsWith(".branch")) {
def index = key.lastIndexOf(".")
if(index != -1) {
def name = key.substring(0, index)
customBranch[name] = value
}
} else if(key.endsWith(".update")) {
def index = key.lastIndexOf(".")
if(index != -1) {
def name = key.substring(0, index)
repoIncludeOrUpdate[name] = repoIncludeOrUpdate[name] || value == 'true'
}
} else if(!key.endsWith(".dir") && !key.endsWith(".url")) {
repoIncludeOrUpdate[key] = repoIncludeOrUpdate[key] || value == 'true'
}
}
repoIncludeOrUpdate.findResults { name, include ->
def jobPrefix = customJobPrefix[name] ?: "metaborg/$name"
def branch = customBranch[name] ?: BRANCH_NAME
include ? "$jobPrefix/$branch" : null
}
},
preBuildCommand: './repo update',
gradleParallel: false,
gradleMaxWorkers: '1',
gradleBuildTasks: 'buildAll archiveSpoofax3LwbEclipseInstallations',
gradlePublishTasks: 'publishAll publishSpoofax3Lwb',
gradleArgs: '--scan',
buildMainBranch: false,
buildTag: false,
buildReleaseTag: false,
publishDevelopBranch: true,
publishReleaseTag: false,
archive: true,
archivePattern: 'spoofax.pie/lwb/spoofax.lwb.eclipse.repository/build/dist/Eclipse-*.zip',
slack: true,
slackChannel: "#spoofax3-dev",
)