-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
41 lines (33 loc) · 885 Bytes
/
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
#!/usr/bin/env groovy
outputImages = [
"bsb002_uboot.bin",
"kernel.bin",
"root.bin",
"overlay.bin",
];
productFactoryDir = 'bridge/build/bsb002/release/product/factory/bsb002';
def printStep(message) {
print("===== ${message} =====")
}
def archiveResults() {
printStep("archiving ${outputImages}")
for(image in outputImages) {
archiveArtifacts artifacts: "${productFactoryDir}/${image}", fingerprint: true
}
}
def runInNetworkDeniedJail(args) {
sh "firejail --force --noprofile --net=none ${args}"
}
def buildWithNoNetworking() {
printStep("build with no networking")
runInNetworkDeniedJail("make -j4")
}
stage('test') {
node('docker_BB') {
sh "echo \"===== RUNNING AS `whoami`@`hostname` IN `pwd` =====\""
deleteDir()
checkout scm
buildWithNoNetworking()
archiveResults()
}
}