-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
197 lines (197 loc) · 8.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
pipeline {
agent {
node {
label 'master'
customWorkspace "/tmp/.jenkins_${env.BRANCH_NAME}_site"
}
}
parameters {
string(name: 'GLUON_VERSION', defaultValue: 'v2021.1.1', description: 'Gluon version')
string(name: 'BUILD_TYPE', defaultValue: 'beta', description: 'experimental, beta, stable')
string(name: 'VERSION', defaultValue: '1.4.14', description: 'Firmware version')
string(name: 'SITE_URL', defaultValue: 'https://github.com/freifunk-suedpfalz/site-ffsuedpfalz', description: 'FF Site Git Repository')
string(name: 'SITE_BRANCH', defaultValue: '1.4.14_b', description: 'FF Site Git Branch')
string(name: 'CORES', defaultValue: '4', description: 'Cores for make process')
}
stages {
stage('prepare build') {
steps {
rocketSend channel: 'firmware_builds', message: 'Build started'
echo "Running ${env.BUILD_ID} on on ${env.JENKINS_URL}"
checkout scm
sh "sh -x build-jenkins.sh ${env.BRANCH_NAME} ${params.GLUON_VERSION} ${params.BUILD_TYPE} ${params.VERSION} ${params.SITE_URL} ${params.SITE_BRANCH} ${params.CORES}"
}
}
stage('build ar71xx-generic') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=ar71xx-generic GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage("build ar71xx-nand") {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=ar71xx-nand GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build ar71xx-tiny') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=ar71xx-tiny GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build ath79-generic') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=ath79-generic GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage("build brcm2708-bcm2708") {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=brcm2708-bcm2708 GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage("build brcm2708-bcm2709") {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=brcm2708-bcm2709 GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build ipq40xx-generic') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=ipq40xx-generic GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build ipq806x-generic') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=ipq806x-generic GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build lantiq-xrx200') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=lantiq-xrx200 GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build lantiq-xway') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=lantiq-xway GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build mpc85xx-generic') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=mpc85xx-generic GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build mpc85xx-p1020') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=mpc85xx-p1020 GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build ramips-mt7620') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=ramips-mt7620 GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build ramips-mt7621') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} V=s GLUON_DEPRECATED=full GLUON_TARGET=ramips-mt7621 GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build ramips-mt76x8') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=ramips-mt76x8 GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build ramips-rt305x') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=ramips-rt305x GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build sunxi-cortexa7') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=sunxi-cortexa7 GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build x86-64') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=x86-64 GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build x86-legacy') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=x86-legacy GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build x86-generic') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=x86-generic GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('build x86-geode') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make -j ${params.CORES} GLUON_DEPRECATED=full GLUON_TARGET=x86-geode GLUON_AUTOUPDATER_BRANCH=${params.BUILD_TYPE} GLUON_AUTOUPDATER_ENABLED=1 GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('create manifest') {
steps {
dir("/tmp/${env.BRANCH_NAME}") {
sh "make manifest GLUON_AUTOUPDATER_BRANCH=${BUILD_TYPE} GLUON_RELEASE=${VERSION}${BUILD_TYPE}"
}
}
}
stage('move images') {
steps {
sh "mkdir -p /mnt/images/${env.BRANCH_NAME}"
sh "yes | cp -rf /tmp/${env.BRANCH_NAME}/output/images/ /mnt/images/${env.BRANCH_NAME}/"
rocketSend channel: 'firmware_builds', message: 'Build finished'
}
}
stage('clean directory') {
steps {
sh "rm -r /tmp/${env.BRANCH_NAME}"
}
}
}
post {
failure {
rocketSend channel: 'firmware_builds', message: 'Build error'
}
}
}