blob: 328c361934d461ebeffa05e602a5eed63c67edfc (
plain)
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
|
- job:
name: openembedded-x86-pre-built-images
project-type: matrix
defaults: global
logrotate:
daysToKeep: 30
numToKeep: 30
parameters:
- string:
name: DEVICE_TYPE
default: 'x86'
- string:
name: LAVA_SERVER
default: 'lng.validation.linaro.org/RPC2/'
- string:
name: MACHINE
default: 'lng-x86-64'
- string:
name: gcc_version
default: '5.2'
- file:
name: oe_pre-built_parameters
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
disabled: false
node: build
child-workspace: .
display-name: 'OpenEmbedded pre-built images (x86)'
scm:
- git:
url: https://git.linaro.org/openembedded/jenkins-setup.git
refspec: +refs/heads/master:refs/remotes/origin/master
name: origin
branches:
- refs/heads/master
skip-tag: true
shallow-clone: true
wipe-workspace: false
axes:
- axis:
type: slave
name: label
values:
- build
execution-strategy:
sequential: true
wrappers:
- timestamps
- matrix-tie-parent:
node: build
builders:
- linaro-publish-token
- shell: |
#!/bin/bash
set -ex
export PATH="$HOME/bin:$PATH"
# we clean build and populate it from cache
bash -x pre-build-do-cleanup.sh
# do a build
bash -x init-and-build.sh -a x86 -g ${gcc_version} virtual/kernel linux-libc-headers
cd ${WORKSPACE}
bash -x post-build-create-image-manifest.sh -p linux-libc-headers-dev
bash -x post-build-sort-out-downloads.sh
# Capture what we're building in the build output.
repo manifest -r
case "${linux_kernel}" in
linaro-lng-x86-64)
BUNDLE_STREAM_NAME="/public/team/linaro/ci-linux-lng-v${linux_kernel_version}/"
;;
linaro-lng-test-x86-64)
BUNDLE_STREAM_NAME="/public/team/linaro/ci-linux-lng-v${linux_kernel_version}-pre-merge/"
;;
linaro-lng-rt-x86-64)
BUNDLE_STREAM_NAME="/public/team/linaro/ci-linux-lng-v${linux_kernel_version}-rt/"
;;
linaro-lng-rt-test-x86-64)
BUNDLE_STREAM_NAME="/public/team/linaro/ci-linux-lng-v${linux_kernel_version}-rt-pre-merge/"
;;
esac
KERNEL_URL="http://snapshots.linaro.org/openembedded/pre-built/${linux_kernel}-${linux_kernel_version}/${BUILD_NUMBER}/$(ls ${WORKSPACE}/out/bzImage*.bin |xargs basename)"
cat << EOF > post_build_lava_parameters
DEVICE_TYPE=${DEVICE_TYPE}
BUNDLE_STREAM_NAME=${BUNDLE_STREAM_NAME}
LAVA_SERVER=${LAVA_SERVER}
KERNEL_URL=${KERNEL_URL}
EOF
- inject:
properties-file: post_build_lava_parameters
- shell: |
export ROOTFS_BUILD_NUMBER=121
export ROOTFS_BUILD_URL="http://releases.linaro.org/15.06/openembedded/images/lng-x86/linaro-image-lng-qemux86-20150618-121.rootfs.cpio.gz"
# Parse recipe and get GIT_URL/GIT_BRANCH/GIT_COMMIT
export GIT_URL=$(grep "^SRC_URI =" meta-linaro/meta-linaro/recipes-kernel/linux/${linux_kernel}_${linux_kernel_version}.bb | cut -d'"' -f2 | cut -d';' -f1)
export GIT_BRANCH=$(grep "^SRC_URI =" meta-linaro/meta-linaro/recipes-kernel/linux/${linux_kernel}_${linux_kernel_version}.bb |cut -d'"' -f2 | cut -d'=' -f2)
(cd /mnt/ci_build/workspace/downloads/git2/git.linaro.org.kernel.linux-linaro-lng.git && export GIT_COMMIT=$(git rev-parse ${GIT_BRANCH}))
mkdir -p out/lava
rm -rf configs lci-build-tools
git clone --depth 1 http://git.linaro.org/ci/lci-build-tools.git
git clone --depth 1 http://git.linaro.org/ci/job/configs.git
./lci-build-tools/yaml-to-json.py configs/openembedded-x86-pre-built-images/lava-job-definitions/${DEVICE_TYPE}/template.yaml > out/lava/template.json
./lci-build-tools/yaml-to-json.py configs/openembedded-x86-pre-built-images/lava-job-definitions/${DEVICE_TYPE}/template-base.yaml > out/lava/template-base.json
./lci-build-tools/yaml-to-json.py configs/openembedded-x86-pre-built-images/lava-job-definitions/${DEVICE_TYPE}/template-benchmark.yaml > out/lava/template-benchmark.json
./lci-build-tools/yaml-to-json.py configs/openembedded-x86-pre-built-images/lava-job-definitions/${DEVICE_TYPE}/template-cyclic.yaml > out/lava/template-cyclic.json
# Add md5sums for all build artefacts that don't have one yet.
for f in $(find ${WORKSPACE}/out | grep -v md5) ; do
if [ -f "$f" ] ; then
md5sum $f | awk -F/ '{print $1 $NF}' > ${f}.md5
fi
done
# Publish to snapshots
test -d ${HOME}/bin || mkdir ${HOME}/bin
wget https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
time python ${HOME}/bin/linaro-cp.py \
--api_version 3 \
--link-latest \
out openembedded/pre-built/${linux_kernel}-${linux_kernel_version}/${BUILD_NUMBER}
#time python ${HOME}/bin/linaro-cp.py downloads openembedded/sources
publishers:
- email:
recipients: 'anders.roxell@linaro.org fathi.boudra@linaro.org koen.kooi@linaro.org riku.voipio@linaro.org'
|