This repository has been archived by the owner on Mar 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Jenkinsfile.old
74 lines (73 loc) · 2.69 KB
/
Jenkinsfile.old
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
#!/usr/bin/env groovy
stage("Build") {
parallel (
"Windows" : {
node('windows') {
timeout(60) {
checkout poll: false, changelog: false, scm: scm
bat ("git clean -xdff")
bat ("Protobuild.exe --upgrade-all")
try {
bat ('Protobuild.exe --automated-build')
stash includes: '*.nupkg', name: 'windows-packages'
} finally {
publishHTML([allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'Protogame.Tests/bin/Windows/AnyCPU/Debug/VisualHTML', reportFiles: 'index.html', reportName: 'Visual Test Report - Windows'])
}
}
}
},
"Mac": {
node('mac') {
timeout(60) {
checkout poll: false, changelog: false, scm: scm
sh ("git clean -xdff")
sh ("mono Protobuild.exe --upgrade-all MacOS")
sh ("mono Protobuild.exe --upgrade-all Android")
sh ("mono Protobuild.exe --upgrade-all iOS")
try {
sh ("mono Protobuild.exe --automated-build")
stash includes: '*.nupkg', name: 'mac-packages'
} finally {
publishHTML([allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'Protogame.Tests/bin/MacOS/AnyCPU/Debug/VisualHTML', reportFiles: 'index.html', reportName: 'Visual Test Report - macOS'])
}
}
}
},
"Linux": {
node('linux') {
timeout(60) {
checkout poll: true, changelog: true, scm: scm
sh ("git clean -xdff")
sh ("bash -c 'Xorg -noreset +extension GLX +extension RANDR +extension RENDER -config /xorg.conf :2 & echo \"\$!\" > xorg.pid'")
try {
sh ("mono Protobuild.exe --upgrade-all")
try {
sh ("DISPLAY=:2 mono Protobuild.exe --automated-build")
stash includes: '*.nupkg', name: 'linux-packages'
} finally {
sh ("if [ -e xorg.pid ]; then kill \$(<xorg.pid); fi")
}
} finally {
publishHTML([allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'Protogame.Tests/bin/Linux/AnyCPU/Debug/VisualHTML', reportFiles: 'index.html', reportName: 'Visual Test Report - Linux'])
}
}
}
}
)
}
stage("Package") {
node('windows') {
// Ensure a seperate working directory to the normal linux node above.
ws {
timeout(60) {
checkout poll: true, changelog: true, scm: scm
if (fileExists('unified.build')) {
unstash 'windows-packages'
unstash 'mac-packages'
unstash 'linux-packages'
bat ("Protobuild.exe --automated-build unified.build")
}
}
}
}
}