-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
61 lines (50 loc) · 1.71 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
#!/usr/bin/groovy
// Copyright (C) 2019 Luxoft Sweden AB
// SPDX-License-Identifier: MPL-2.0
def image
node("Component") {
stage("Clean up the environment") {
sh '''
rm -rf *
'''
}
stage("Checkout") {
checkout scm
}
stage("Build Docker container") {
image = docker.build("user-identification-manager", "--build-arg UID=\$(id -u) \
--build-arg GID=\$(id -g) \
-f ./tools/ci/Dockerfile .")
}
image.inside {
stage("Build for Host") {
sh 'meson -Dwerror=true build'
sh 'ninja -C build'
}
stage("Tests on Host") {
sh 'meson test -C build --print-errorlogs'
}
stage("Check Source") {
sh 'tools/check . build'
}
stage("Download Raspberry Pi SDK") {
sh '''
wget https://pelux.io/jenkins/job/pelux-manifests_NIGHTLY_rpi-qtauto/lastSuccessfulBuild/artifact/artifacts_rpi-qtauto/pelux-glibc-x86_64-core-image-pelux-qtauto-neptune-dev-cortexa7t2hf-neon-vfpv4-toolchain-*.sh/*zip*/artifacts_rpi-qtauto.zip
unzip artifacts_rpi-qtauto.zip
'''
}
stage("Install Raspberry Pi SDK") {
sh '''
chmod +x pelux-glibc-x86_64-*.sh
./pelux-glibc-x86_64-*.sh -y -d ~/opt/pelux-sdk-x86_64/
'''
}
stage("Build with Raspberry Pi SDK") {
sh '''
source ~/opt/pelux-sdk-x86_64/environment-setup-cortexa7t2hf-neon-vfpv4-pelux-linux-gnueabi
meson build_rpi
ninja -C build_rpi
'''
}
}
}