forked from cvet/fonline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
147 lines (147 loc) · 3.22 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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
pipeline {
environment {
FO_BUILD_DEST = 'Build'
FO_ROOT = '.'
FO_INSTALL_PACKAGES = 0
}
options {
disableConcurrentBuilds()
}
agent none
stages {
stage('Build Main Targets') {
parallel {
stage('Build Android') {
agent {
kubernetes {
label 'linux'
yamlFile 'BuildScripts/build-pod.yaml'
}
}
steps {
sh './BuildScripts/android.sh'
dir('Build/android/') {
stash name: 'android', includes: 'Binaries/**'
}
}
}
stage('Build Linux') {
agent {
kubernetes {
label 'linux'
yamlFile 'BuildScripts/build-pod.yaml'
}
}
steps {
container('jnlp') {
sh './BuildScripts/linux.sh'
dir('Build/linux/') {
stash name: 'linux', includes: 'Binaries/**'
}
}
}
}
stage('Build Web') {
agent {
kubernetes {
label 'linux'
yamlFile 'BuildScripts/build-pod.yaml'
}
}
steps {
container('jnlp') {
sh './BuildScripts/web.sh'
dir('Build/web/') {
stash name: 'web', includes: 'Binaries/**'
}
}
}
}
stage('Build Windows') {
agent {
node {
label 'win'
}
}
steps {
bat 'BuildScripts\\windows.bat'
dir('Build/windows/') {
stash name: 'windows', includes: 'Binaries/**'
}
}
post {
cleanup {
deleteDir()
}
}
}
stage('Build Mac OS') {
agent {
node {
label 'mac'
}
}
steps {
sh './BuildScripts/mac.sh'
dir('Build/mac/') {
stash name: 'mac', includes: 'Binaries/**'
}
}
post {
cleanup {
deleteDir()
}
}
}
stage('Build iOS') {
agent {
node {
label 'mac'
}
}
steps {
sh './BuildScripts/ios.sh'
dir('Build/ios/') {
stash name: 'ios', includes: 'Binaries/**'
}
}
post {
cleanup {
deleteDir()
}
}
}
}
}
stage('Create Build Artifacts') {
agent {
node {
label 'master'
}
}
steps {
dir('SDK')
{
sh 'rm -rf ./Binaries/ReadMe.txt'
unstash 'android'
unstash 'linux'
unstash 'web'
unstash 'windows'
unstash 'mac'
unstash 'ios'
sh 'zip -r -0 ${GIT_COMMIT}.zip ./'
}
}
post {
success {
dir('SDK') {
archiveArtifacts artifacts: "${GIT_COMMIT}.zip", fingerprint: true
}
}
cleanup {
deleteDir()
}
}
}
}
}