- job: name: 96boards-reference-platform-aosp-hikey project-type: freestyle defaults: global logrotate: daysToKeep: 60 numToKeep: 60 properties: - authorization: anonymous: - job-read linaro: - job-build - job-cancel parameters: - string: name: BUILD_CONFIG_FILENAME default: 'reference-platform-aosp-hikey' - string: name: ART_URL default: https://android-qa-reports.linaro.org/api/ disabled: true node: docker-utopic-aosp display-name: 'Reference Platform - AOSP (HiKey)' concurrent: true triggers: - timed : 'H H * * 6' - gerrit: server-name: __ANY__ trigger-on: - change-merged-event projects: - project-compare-type: 'PLAIN' project-pattern: 'android-patchsets' branches: - branch-compare-type: 'PLAIN' branch-pattern: 'master' - project-compare-type: 'PLAIN' project-pattern: 'platform/manifest' branches: - branch-compare-type: 'PLAIN' branch-pattern: 'linaro-marshmallow' - project-compare-type: 'PLAIN' project-pattern: 'device/linaro/common' branches: - branch-compare-type: 'PLAIN' branch-pattern: 'linaro-marshmallow' - project-compare-type: 'PLAIN' project-pattern: 'android-build-configs' branches: - branch-compare-type: 'PLAIN' branch-pattern: 'master' file-paths: - compare-type: 'PLAIN' pattern: 'reference-platform-aosp-hikey' wrappers: - timestamps - timeout: timeout: 500 builders: - linaro-publish-token: host: builds.96boards.org - shell: | CI_MAIL_RECIPIENTS="${GERRIT_CHANGE_OWNER_EMAIL},${GERRIT_EVENT_ACCOUNT_EMAIL}" CI_MAIL_RECIPIENTS="${CI_MAIL_RECIPIENTS},vishal.bhoj@linaro.org" CI_MAIL_RECIPIENTS="${CI_MAIL_RECIPIENTS},fathi.boudra@linaro.org" CI_MAIL_RECIPIENTS="${CI_MAIL_RECIPIENTS},daniel.diaz@linaro.org" echo "CI_MAIL_RECIPIENTS=${CI_MAIL_RECIPIENTS}" > env_var_parameters - inject: properties-file: env_var_parameters - 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 mtools 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 build-configs git clone --depth 1 https://git.linaro.org/infrastructure/linaro-android-build-tools.git build-tools git clone --depth 1 https://git.linaro.org/infrastructure/linaro-jenkins-tools.git jenkins-tools git clone --depth 1 http://android-git.linaro.org/git/android-build-configs.git build-configs export BUILD_CONFIG_FILENAME=${BUILD_CONFIG_FILENAME:-${JOB_NAME#android-*}} 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` # Download vendor binaries for hikey. mkdir -p build cd build/ wget https://dl.google.com/dl/android/aosp/linaro-hikey-20160226-67c37b1a.tgz tar -xvf linaro-hikey-20160226-67c37b1a.tgz yes "I ACCEPT" | ./extract-linaro-hikey.sh cd - build-tools/node/build us-east-1.ec2-git-mirror.linaro.org "${CONFIG}" cp -a /home/buildslave/srv/${JOB_NAME}/build/out/*.xml /home/buildslave/srv/${JOB_NAME}/build/out/*.json ${WORKSPACE}/ # Create smaller userdata partition for 4gb emmc cd build/ out/host/linux-x86/bin/make_ext4fs -s -T -1 -S out/root/file_contexts -L data -l 1342177280 -a data out/userdata-4gb.img out/data cd - # Publish PUB_DEST=snapshots/reference-platform/aosp/hikey/${BUILD_NUMBER} cd build/out rm -f ramdisk.img for image in "boot.img" "boot_fat.uefi.img" "system.img" "userdata.img" "userdata-4gb.img" "cache.img"; do echo "Compressing ${image}" tar -Jcf ${image}.tar.xz ${image} rm -f ${image} done cd - rm -rf build/out/BUILD-INFO.txt wget https://git.linaro.org/ci/job/configs.git/blob_plain/HEAD:/android-lcr/hikey/build-info/r-lcr-template.txt -O build/out/BUILD-INFO.txt 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|changelog.txt)$" # Construct post-build-lava parameters if [ -f build-configs/${BUILD_CONFIG_FILENAME} ]; then source build-configs/${BUILD_CONFIG_FILENAME} else echo "No config file named ${BUILD_CONFIG_FILENAME} exists" echo "in android-build-configs.git" exit 1 fi cat << EOF > ${WORKSPACE}/post_build_lava_parameters DEVICE_TYPE=${LAVA_DEVICE_TYPE:-${TARGET_PRODUCT}} TARGET_PRODUCT=${TARGET_PRODUCT} MAKE_TARGETS=${MAKE_TARGETS} JOB_NAME=${JOB_NAME} BUILD_NUMBER=${BUILD_NUMBER} BUILD_URL=${BUILD_URL} LAVA_SERVER=validation.linaro.org/RPC2/ IMAGE_EXTENSION=img.tar.xz FRONTEND_JOB_NAME=${JOB_NAME} DOWNLOAD_URL=${PUBLISH_SERVER}/${PUB_DEST} CUSTOM_JSON_URL=https://git.linaro.org/qa/test-plans.git/blob_plain/HEAD:/android/hikey/template-boot.json SKIP_REPORT=false EOF echo "Build finished" - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-cts-focused1.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-cts-focused2.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-antutu2.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-antutu3.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-antutu5.7.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-benchmarkpi.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-cf-bench.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-gearses2eclair.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-geekbench3.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-javawhetstone.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-jbench.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-linpack.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-quadrantpro.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-scimark.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-sqlite.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-rl-sqlite.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-vellamo3.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-applications.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-caffeinemark.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-antutu6.0.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | if [ -n "$GERRIT_PROJECT" ]; then echo "SKIP_LAVA=1" >> ${WORKSPACE}/post_build_lava_parameters fi sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-cts-part1.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-cts-part2.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-cts-opengl.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-cts-media.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-andebenchpro2015.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-glbenchmark-2.5.1.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true - shell: | sed -i "s/CUSTOM_JSON_URL=.*/CUSTOM_JSON_URL=https:\/\/git.linaro.org\/qa\/test-plans.git\/blob_plain\/HEAD:\/android\/hikey\/template-weekly.json/g" ${WORKSPACE}/post_build_lava_parameters - trigger-builds: - project: 'post-build-lava' property-file: post_build_lava_parameters block: true publishers: - email-ext: recipients: '${CI_MAIL_RECIPIENTS}' content-type: text body: | Build Triggered by: ${GERRIT_CHANGE_SUBJECT}: ${GERRIT_CHANGE_URL} Build URL: ${PROJECT_URL}${BUILD_NUMBER}/ Full log: ${PROJECT_URL}${BUILD_NUMBER}/consoleText Parsed warnings/errors: ${PROJECT_URL}${BUILD_NUMBER}/parsed_console Errors: ${BUILD_LOG_REGEX, regex=".*ERROR:.* ", linesBefore=0, linesAfter=0, showTruncatedLines=false} - archive: artifacts: '*.xml,*.json' latest-only: true - logparser: parse-rules: '/var/lib/jenkins/userContent/android.parse' 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'