blob: b5a009fd741919ac35374f1187a909bdb07c6d8c [file] [log] [blame]
Daniel Díazfc07dcb2015-07-27 16:24:56 +01001- job:
2 name: android-lmg-vexpress-aosp-master
3 project-type: freestyle
4 defaults: global
5 logrotate:
Fathi Boudrabf3c1f32016-02-11 07:25:53 +02006 daysToKeep: 60
7 numToKeep: 60
Daniel Díazfc07dcb2015-07-27 16:24:56 +01008 properties:
9 - authorization:
10 anonymous:
11 - job-read
Benjamin Copeland9dc2eb82022-10-11 12:40:33 +010012 everyone-flat:
Daniel Díazfc07dcb2015-07-27 16:24:56 +010013 - job-build
Daniel Díazfc07dcb2015-07-27 16:24:56 +010014 - job-cancel
Riku Voipiob7c49aa2020-12-01 15:15:24 +020015 disabled: true
Vishal Bhoj902a7942018-04-14 12:08:04 +053016 node: docker-xenial-aosp
Daniel Díazfc07dcb2015-07-27 16:24:56 +010017 display-name: 'Versatile Express - AOSP Master LSK (Android)'
18 concurrent: true
19 wrappers:
20 - timestamps
21 - timeout:
22 timeout: 500
23 builders:
Daniel Díazfc07dcb2015-07-27 16:24:56 +010024 - shell: |
25 #!/bin/bash
26
Daniel Díaz5f7bf0b2015-11-03 12:48:21 -060027 BUILD_CONFIG_FILENAME=aosp-master-vexpress-lsk
28
Daniel Díazfc07dcb2015-07-27 16:24:56 +010029 java -version
Fathi Boudraf7993a82015-10-13 11:53:11 +030030
Daniel Díaz1eda6c52015-07-29 21:25:35 +010031 sudo add-apt-repository ppa:linaro-maintainers/tools
Fathi Boudraf7993a82015-10-13 11:53:11 +030032 sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
Daniel Díazfc07dcb2015-07-27 16:24:56 +010033 sudo apt-get update
Fathi Boudrab7e172f2020-12-10 21:21:04 +010034 sudo apt-get install -y bison git gperf libxml2-utils python-mako zip time python-requests genisoimage patch
Daniel Díazfc07dcb2015-07-27 16:24:56 +010035
36 mkdir -p ${HOME}/bin ${WORKSPACE}/build/out
37 curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo
Daniel Díazfc07dcb2015-07-27 16:24:56 +010038 chmod a+x ${HOME}/bin/*
39 export PATH=${HOME}/bin:${PATH}
40
41 if [ ! -d "/home/buildslave/srv/${JOB_NAME}" ]; then
42 sudo mkdir -p /home/buildslave/srv/${JOB_NAME}
43 sudo chmod 777 /home/buildslave/srv/${JOB_NAME}
44 fi
45 cd /home/buildslave/srv/${JOB_NAME}
46
47 git config --global user.email "ci_notify@linaro.org"
48 git config --global user.name "Linaro CI"
49
50 # Runs as ubuntu
51 set -xe
Daniel Díaz5f7bf0b2015-11-03 12:48:21 -060052 rm -rf build-tools jenkins-tools build-configs build/out build/android-patchsets
Yongqin Liu7e76ea42016-04-15 16:16:02 +080053 git clone --depth 1 https://git.linaro.org/infrastructure/linaro-android-build-tools.git build-tools
Daniel Díazfc07dcb2015-07-27 16:24:56 +010054 git clone --depth 1 https://git.linaro.org/infrastructure/linaro-jenkins-tools.git jenkins-tools
Vishal Bhoj53f4a622016-11-15 22:10:18 +053055 git clone --depth 1 http://android-git.linaro.org/git/android-build-configs.git build-configs
Daniel Díaz5f7bf0b2015-11-03 12:48:21 -060056
57 export BUNDLE_STREAM_NAME=${BUNDLE_STREAM_NAME:-/private/team/wg/wg-private/}
58 export BUILD_CONFIG_FILENAME=${BUILD_CONFIG_FILENAME:-${JOB_NAME#android-*}}
Daniel Díazfc07dcb2015-07-27 16:24:56 +010059
Daniel Díaz0967bf02017-01-06 13:33:54 -060060 # Early test
61 if [ ! -f build-configs/${BUILD_CONFIG_FILENAME} ]; then
62 echo "No config file named ${BUILD_CONFIG_FILENAME} exists"
63 echo "in android-build-configs.git"
64 exit 1
65 fi
66
Daniel Díazfc07dcb2015-07-27 16:24:56 +010067 cat << EOF > config.txt
Vishal Bhoj53f4a622016-11-15 22:10:18 +053068 BUILD_CONFIG_REPO=http://android-git.linaro.org/git/android-build-configs.git
Daniel Díazfc07dcb2015-07-27 16:24:56 +010069 BUILD_CONFIG_BRANCH=master
70 EOF
71 echo config.txt
72 export CONFIG=`base64 -w 0 config.txt`
73
Daniel Díaz0967bf02017-01-06 13:33:54 -060074 # Build Android
Daniel Díazfc07dcb2015-07-27 16:24:56 +010075 build-tools/node/build us-east-1.ec2-git-mirror.linaro.org "${CONFIG}"
76 cp -a /home/buildslave/srv/${JOB_NAME}/build/out/*.xml ${WORKSPACE}/
77
Daniel Díaz0967bf02017-01-06 13:33:54 -060078 # Publish parameters
79 cat << EOF > ${WORKSPACE}/publish_parameters
80 PUB_SRC=${PWD}/build/out
81 PUB_DEST=/android/${JOB_NAME}/${BUILD_NUMBER}
82 EOF
Daniel Díazfc07dcb2015-07-27 16:24:56 +010083
Daniel Díaz5f7bf0b2015-11-03 12:48:21 -060084 # Construct post-build-lava parameters
Daniel Díaz0967bf02017-01-06 13:33:54 -060085 source build-configs/${BUILD_CONFIG_FILENAME}
Daniel Díaz1eda6c52015-07-29 21:25:35 +010086 cat << EOF > ${WORKSPACE}/post_build_lava_parameters
Daniel Díaz5f7bf0b2015-11-03 12:48:21 -060087 DEVICE_TYPE=${LAVA_DEVICE_TYPE:-${TARGET_PRODUCT}}
88 TARGET_PRODUCT=${TARGET_PRODUCT}
89 MAKE_TARGETS=${MAKE_TARGETS}
90 JOB_NAME=${JOB_NAME}
91 BUILD_NUMBER=${BUILD_NUMBER}
92 BUILD_URL=${BUILD_URL}
93 LAVA_SERVER=validation.linaro.org/RPC2/
Daniel Díaz5f7bf0b2015-11-03 12:48:21 -060094 LAVA_STREAM=${BUNDLE_STREAM_NAME}
Daniel Díaz1eda6c52015-07-29 21:25:35 +010095 BUNDLE_STREAM_NAME=${BUNDLE_STREAM_NAME}
Daniel Díaz5f7bf0b2015-11-03 12:48:21 -060096 FRONTEND_JOB_NAME=${JOB_NAME}
Daniel Díaz1eda6c52015-07-29 21:25:35 +010097 EOF
Daniel Díazfc07dcb2015-07-27 16:24:56 +010098
Daniel Díaz5f7bf0b2015-11-03 12:48:21 -060099 grep \
100 -e ^LAVA_JOB_URL \
101 build-configs/${BUILD_CONFIG_FILENAME} \
102 | sed -e 's:^LAVA_JOB_URL:CUSTOM_JSON_URL:g' \
103 >> ${WORKSPACE}/post_build_lava_parameters
Daniel Díaz0967bf02017-01-06 13:33:54 -0600104 - inject:
105 properties-file: publish_parameters
106 - linaro-publish-token
107 - shell:
108 !include-raw:
109 - android/linaro-publisher.sh
Daniel Díaz1eda6c52015-07-29 21:25:35 +0100110 - trigger-builds:
111 - project: 'post-build-lava'
112 property-file: post_build_lava_parameters
113 block: true
Daniel Díazfc07dcb2015-07-27 16:24:56 +0100114 publishers:
115 - archive:
116 artifacts: '*.xml'
117 latest-only: true
118 - logparser:
Fathi Boudrae86882b2019-03-22 14:15:21 +0200119 parse-rules: '/var/jenkins_home/userContent/android.parse'
Daniel Díazfc07dcb2015-07-27 16:24:56 +0100120 unstable-on-warning: false
121 fail-on-error: false
122 - fingerprint:
123 files: 'build/fingerprints/*'
124 - email:
125 recipients: 'vishal.bhoj@linaro.org fathi.boudra@linaro.org daniel.diaz@linaro.org'