forked from GENIVI/genivi-dev-platform
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
92 lines (79 loc) · 1.88 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
pipeline {
agent {
docker {
image 'gmacario/build-yocto'
}
}
stages {
// stage('Checkout') {
// steps {
// echo 'Checkout stage'
// git(url: 'https://github.com/GENIVI/genivi-dev-platform', branch: 'master', changelog: true)
// }
// }
stage('Build') {
steps {
echo 'hello'
sh '''#!/bin/bash -xe
# DEBUG
id
pwd
ls -la
printenv | sort
# Configure git
git config --global user.name "easy-jenkins"
git config --global user.email "$(whoami)@$(hostname)"
# Configure the build
source init.sh raspberrypi3
cp rokers-developer.conf developer.conf
# Prevent error "Do not use Bitbake as root"
[ $(whoami) = "root" ] && touch conf/sanity.conf
# Workaround for "Please use a locale setting which supports utf-8"
# See https://github.com/gmacario/my-agl-pipelines/issues/9
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
# Perform the actual build
# bitbake core-image-minimal
# TODO: bitbake genivi-dev-platform
# TODO: bitbake genivi-dev-platform-sdk
bitbake rokers-image-base
# DEBUG
# ls -la tmp/
# ls -la tmp/deploy/
# ls -la tmp/deploy/images
# ls -la tmp/deploy/images/raspberrypi3/
# EOF'''
}
}
stage('Test') {
steps {
parallel(
"Chrome": {
echo 'testing in chrome'
},
"Firefox": {
echo 'testing in firefox'
}
)
}
}
stage('Deploy') {
steps {
echo 'INFO: Deploying'
sh '''#!/bin/bash -xe
# DEBUG
pwd
ls -la
ls -la gdp-src-build/
ls -la gdp-src-build/tmp/
ls -la gdp-src-build/tmp/deploy/
ls -la gdp-src-build/tmp/deploy/images/
ls -la gdp-src-build/tmp/deploy/images/raspberrypi3/
# EOF'''
archive 'gdp-src-build/tmp/deploy/images/*/*.rootfs.manifest'
archive 'gdp-src-build/tmp/deploy/images/*/*.rootfs.rpi-sdimg'
}
}
}
}