blob: 4a3dc93974a57b3f48220a4d0b2e0ffda93682f1 (
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
|
- job:
name: openembedded-x86-pre-built-images
project-type: matrix
defaults: global
logrotate:
daysToKeep: 30
numToKeep: 30
parameters:
- string:
name: BUNDLE_STREAM_NAME
default: '/public/team/linaro/ci-linux-lng/'
- string:
name: DEVICE_TYPE
default: 'lng-x86'
- string:
name: LAVA_SERVER
default: 'validation.linaro.org/RPC2/'
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
disabled: false
node: build
child-workspace: .
display-name: 'OpenEmbedded pre-built images (x86)'
axes:
- axis:
type: slave
name: label
values:
- build
- axis:
type: user-defined
name: gcc_version
values:
- 4.9
- axis:
type: user-defined
name: MACHINE
values:
- lng-x86-64
- lng-rt-x86-64
execution-strategy:
sequential: true
wrappers:
- timestamps
- matrix-tie-parent:
node: build
builders:
- linaro-publish-token
- shell: |
#!/bin/bash
set -x
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
cd ${WORKSPACE}
bash -x post-build-create-image-manifest.sh
bash -x post-build-sort-out-downloads.sh
# Capture what we're building in the build output.
repo manifest -r
[ ${MACHINE} = "lng-rt-x86-64" ] && BUNDLE_STREAM_NAME="/public/team/linaro/ci-linux-lng-preempt-rt/"
KERNEL_URL="http://snapshots.linaro.org/openembedded/pre-built/${MACHINE}/${BUILD_NUMBER}/$(ls 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=$(wget -q --no-check-certificate -O - https://ci.linaro.org/job/openembedded-x86-rootfs/gcc_version=4.9,label=build,rootfs=lng/lastSuccessfulBuild/buildNumber)
export ROOTFS_BUILD_TIMESTAMP=$(wget -q --no-check-certificate -O - https://ci.linaro.org/job/openembedded-x86-rootfs/gcc_version=4.9,label=build,rootfs=lng/lastSuccessfulBuild/buildTimestamp?format=yyyyMMdd)
export ROOTFS_BUILD_URL="http://snapshots.linaro.org/openembedded/images/lng-x86-gcc-4.9/${ROOTFS_BUILD_NUMBER}/linaro-image-lng-qemux86-${ROOTFS_BUILD_TIMESTAMP}-${ROOTFS_BUILD_NUMBER}.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/linaro-${MACHINE}_git.bb | cut -d'"' -f2 | cut -d';' -f1)
export GIT_BRANCH=$(grep "^SRC_URI =" meta-linaro/meta-linaro/recipes-kernel/linux/linaro-${MACHINE}_git.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
# 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 out openembedded/pre-built/${MACHINE}/${BUILD_NUMBER}
#time python ${HOME}/bin/linaro-cp.py downloads openembedded/sources
python ${HOME}/bin/linaro-cp.py --make-link openembedded/pre-built/${MACHINE}/${BUILD_NUMBER}
publishers:
- trigger:
project: 'openembedded-lng-x86-pre-built-test-definitions, openembedded-lng-rt-x86-pre-built-test-definitions'
- email:
recipients: 'anders.roxell@linaro.org fathi.boudra@linaro.org koen.kooi@linaro.org riku.voipio@linaro.org'
|