blob: 4b04f1bff42b6c6dd917dd2c48717b6de1569409 (
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
|
- job:
name: 96boards-reference-platform-aosp
project-type: freestyle
defaults: global
logrotate:
daysToKeep: 90
numToKeep: 90
properties:
- authorization:
anonymous:
- job-read
linaro:
- job-build
- job-cancel
parameters:
- string:
name: BUILD_CONFIG_FILENAME
default: 'srp-hikey-3.18'
disabled: false
node: docker-utopic-aosp
display-name: '96boards - Reference Platform - AOSP'
concurrent: true
wrappers:
- timestamps
- timeout:
timeout: 500
builders:
- linaro-publish-token:
host: builds.96boards.org
- shell: |
#!/bin/bash
java -version
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y gcc-4.9-multilib bison git gperf libxml2-utils python-mako zip time python-pycurl genisoimage patch
mkdir -p ${HOME}/bin ${WORKSPACE}/build/out
curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo
wget https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
chmod a+x ${HOME}/bin/*
export PATH=${HOME}/bin:${PATH}
if [ ! -d "/home/buildslave/srv/${JOB_NAME}" ]; then
sudo mkdir -p /home/buildslave/srv/${JOB_NAME}
sudo chmod 777 /home/buildslave/srv/${JOB_NAME}
fi
cd /home/buildslave/srv/${JOB_NAME}
git config --global user.email "ci_notify@linaro.org"
git config --global user.name "Linaro CI"
# Runs as ubuntu
set -xe
rm -rf build-tools jenkins-tools build/out build/android-patchsets
git clone --depth 1 https://git.linaro.org/people/vishal.bhoj/linaro-android-build-tools-ci.git build-tools
git clone --depth 1 https://git.linaro.org/infrastructure/linaro-jenkins-tools.git jenkins-tools
cat << EOF > config.txt
BUILD_CONFIG_REPO=http://android.git.linaro.org/git/android-build-configs.git
BUILD_CONFIG_BRANCH=master
EOF
echo config.txt
export CONFIG=`base64 -w 0 config.txt`
build-tools/node/build us-east-1.ec2-git-mirror.linaro.org "${CONFIG}"
cp -a /home/buildslave/srv/${JOB_NAME}/build/out/*.xml ${WORKSPACE}/
# Publish
PUB_DEST=snapshots/reference-platform/aosp/hikey/${BUILD_NUMBER}
cd build/out
rm -f boot.img ramdisk.img
for image in "boot_fat.uefi.img" "boot_fat.img" "system.img" "userdata.img" "cache.img"; do
echo "Compressing ${image}"
tar -Jcf ${image}.tar.xz ${image}
rm -f ${image}
done
cd -
time linaro-cp.py \
--manifest \
--no-build-info \
--link-latest \
--split-job-owner \
--server ${PUBLISH_SERVER} \
build/out \
${PUB_DEST} \
--include "^[^/]+[._](img[^/]*|tar[^/]*|xml|sh|config)$" \
--include "^[BHi][^/]+txt$" \
--include "^(MANIFEST|MD5SUMS)$"
build-tools/node/lava-submit "${CONFIG}"
for f in $(ls -1 build/out/lava-job-info* 2>/dev/null); do
time linaro-cp.py \
--no-build-info \
--split-job-owner \
--server ${PUBLISH_SERVER} \
${f} \
${PUB_DEST}
done
echo "Build finished"
publishers:
- archive:
artifacts: '*.xml'
latest-only: true
- logparser:
parse-rules: 'Android Build'
unstable-on-warning: false
fail-on-error: false
- fingerprint:
files: 'build/fingerprints/*'
- email:
recipients: 'vishal.bhoj@linaro.org fathi.boudra@linaro.org ricardo.salveti@linaro.org'
|