Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 1 | - job: |
| 2 | name: android-lmg-vexpress-aosp-master |
| 3 | project-type: freestyle |
| 4 | defaults: global |
| 5 | logrotate: |
Fathi Boudra | bf3c1f3 | 2016-02-11 07:25:53 +0200 | [diff] [blame] | 6 | daysToKeep: 60 |
| 7 | numToKeep: 60 |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 8 | properties: |
| 9 | - authorization: |
| 10 | anonymous: |
| 11 | - job-read |
Benjamin Copeland | 9dc2eb8 | 2022-10-11 12:40:33 +0100 | [diff] [blame] | 12 | everyone-flat: |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 13 | - job-build |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 14 | - job-cancel |
Riku Voipio | b7c49aa | 2020-12-01 15:15:24 +0200 | [diff] [blame] | 15 | disabled: true |
Vishal Bhoj | 902a794 | 2018-04-14 12:08:04 +0530 | [diff] [blame] | 16 | node: docker-xenial-aosp |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 17 | display-name: 'Versatile Express - AOSP Master LSK (Android)' |
| 18 | concurrent: true |
| 19 | wrappers: |
| 20 | - timestamps |
| 21 | - timeout: |
| 22 | timeout: 500 |
| 23 | builders: |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 24 | - shell: | |
| 25 | #!/bin/bash |
| 26 | |
Daniel Díaz | 5f7bf0b | 2015-11-03 12:48:21 -0600 | [diff] [blame] | 27 | BUILD_CONFIG_FILENAME=aosp-master-vexpress-lsk |
| 28 | |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 29 | java -version |
Fathi Boudra | f7993a8 | 2015-10-13 11:53:11 +0300 | [diff] [blame] | 30 | |
Daniel Díaz | 1eda6c5 | 2015-07-29 21:25:35 +0100 | [diff] [blame] | 31 | sudo add-apt-repository ppa:linaro-maintainers/tools |
Fathi Boudra | f7993a8 | 2015-10-13 11:53:11 +0300 | [diff] [blame] | 32 | sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 33 | sudo apt-get update |
Fathi Boudra | b7e172f | 2020-12-10 21:21:04 +0100 | [diff] [blame] | 34 | sudo apt-get install -y bison git gperf libxml2-utils python-mako zip time python-requests genisoimage patch |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 35 | |
| 36 | mkdir -p ${HOME}/bin ${WORKSPACE}/build/out |
| 37 | curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 38 | 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íaz | 5f7bf0b | 2015-11-03 12:48:21 -0600 | [diff] [blame] | 52 | rm -rf build-tools jenkins-tools build-configs build/out build/android-patchsets |
Yongqin Liu | 7e76ea4 | 2016-04-15 16:16:02 +0800 | [diff] [blame] | 53 | git clone --depth 1 https://git.linaro.org/infrastructure/linaro-android-build-tools.git build-tools |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 54 | git clone --depth 1 https://git.linaro.org/infrastructure/linaro-jenkins-tools.git jenkins-tools |
Vishal Bhoj | 53f4a62 | 2016-11-15 22:10:18 +0530 | [diff] [blame] | 55 | git clone --depth 1 http://android-git.linaro.org/git/android-build-configs.git build-configs |
Daniel Díaz | 5f7bf0b | 2015-11-03 12:48:21 -0600 | [diff] [blame] | 56 | |
| 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íaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 59 | |
Daniel Díaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 60 | # 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íaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 67 | cat << EOF > config.txt |
Vishal Bhoj | 53f4a62 | 2016-11-15 22:10:18 +0530 | [diff] [blame] | 68 | BUILD_CONFIG_REPO=http://android-git.linaro.org/git/android-build-configs.git |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 69 | BUILD_CONFIG_BRANCH=master |
| 70 | EOF |
| 71 | echo config.txt |
| 72 | export CONFIG=`base64 -w 0 config.txt` |
| 73 | |
Daniel Díaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 74 | # Build Android |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 75 | 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íaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 78 | # 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íaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 83 | |
Daniel Díaz | 5f7bf0b | 2015-11-03 12:48:21 -0600 | [diff] [blame] | 84 | # Construct post-build-lava parameters |
Daniel Díaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 85 | source build-configs/${BUILD_CONFIG_FILENAME} |
Daniel Díaz | 1eda6c5 | 2015-07-29 21:25:35 +0100 | [diff] [blame] | 86 | cat << EOF > ${WORKSPACE}/post_build_lava_parameters |
Daniel Díaz | 5f7bf0b | 2015-11-03 12:48:21 -0600 | [diff] [blame] | 87 | 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íaz | 5f7bf0b | 2015-11-03 12:48:21 -0600 | [diff] [blame] | 94 | LAVA_STREAM=${BUNDLE_STREAM_NAME} |
Daniel Díaz | 1eda6c5 | 2015-07-29 21:25:35 +0100 | [diff] [blame] | 95 | BUNDLE_STREAM_NAME=${BUNDLE_STREAM_NAME} |
Daniel Díaz | 5f7bf0b | 2015-11-03 12:48:21 -0600 | [diff] [blame] | 96 | FRONTEND_JOB_NAME=${JOB_NAME} |
Daniel Díaz | 1eda6c5 | 2015-07-29 21:25:35 +0100 | [diff] [blame] | 97 | EOF |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 98 | |
Daniel Díaz | 5f7bf0b | 2015-11-03 12:48:21 -0600 | [diff] [blame] | 99 | 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íaz | 0967bf0 | 2017-01-06 13:33:54 -0600 | [diff] [blame] | 104 | - inject: |
| 105 | properties-file: publish_parameters |
| 106 | - linaro-publish-token |
| 107 | - shell: |
| 108 | !include-raw: |
| 109 | - android/linaro-publisher.sh |
Daniel Díaz | 1eda6c5 | 2015-07-29 21:25:35 +0100 | [diff] [blame] | 110 | - trigger-builds: |
| 111 | - project: 'post-build-lava' |
| 112 | property-file: post_build_lava_parameters |
| 113 | block: true |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 114 | publishers: |
| 115 | - archive: |
| 116 | artifacts: '*.xml' |
| 117 | latest-only: true |
| 118 | - logparser: |
Fathi Boudra | e86882b | 2019-03-22 14:15:21 +0200 | [diff] [blame] | 119 | parse-rules: '/var/jenkins_home/userContent/android.parse' |
Daniel Díaz | fc07dcb | 2015-07-27 16:24:56 +0100 | [diff] [blame] | 120 | 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' |