- job: name: openembedded-odp-rootfs project-type: matrix defaults: global description: | * Build tip ODP in openembedded and setup a testplan on arm(be), arm64(be) * and x86-64 to be able to run the validation tests. logrotate: daysToKeep: 30 numToKeep: 30 parameters: - string: name: LAVA_SERVER default: 'lng.validation.linaro.org/RPC2/' - string: name: BUNDLE_STREAM_NAME default: '/public/team/lng/odp/' properties: - authorization: anonymous: - job-read - job-extended-read linaro: - job-build - job-cancel disabled: true node: build display-name: 'OpenEmbedded build for ODP' scm: - git: url: https://git.linaro.org/openembedded/jenkins-setup.git refspec: +refs/heads/master:refs/remotes/origin/master name: origin branches: - refs/heads/master skip-tag: true shallow-clone: true wipe-workspace: false axes: - axis: type: slave name: label values: - x86_64-07 - axis: type: user-defined name: gcc_version values: - 5.2 - axis: type: user-defined name: arch values: - armv7a - armv7ab - armv8 - x86-64 execution-strategy: sequential: true touchstone: expr: 'arch=="armv7a"' wrappers: - timestamps - build-name: name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}' builders: - linaro-publish-token - shell: | #!/bin/bash set -ex export PATH="$HOME/bin:$PATH" trap cleanup_exit INT TERM EXIT cleanup_exit() { cd ${WORKSPACE}/meta-linaro git reset --hard } # 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 ${arch} -g ${gcc_version} -p virtual/libc source ./openembedded-core/oe-init-build-env build cd ${WORKSPACE} ./srcrev-check.py -d meta-linaro/meta-linaro/recipes-extra/odp -u bash -x init-and-build.sh -a ${arch} -g ${gcc_version} -p linaro-image-lng bash -x post-build-create-image-manifest.sh # Capture what we're building in the build output. repo manifest -r cd ${WORKSPACE} case "${arch}" in armv7a) hwpack="arndale" DEVICE_TYPE="arndale" ;; armv7ab) hwpack="arndale-be" DEVICE_TYPE="arndale" ;; armv8) hwpack="vexpress64" DEVICE_TYPE="juno" ;; x86-64) hwpack="x86_64" DEVICE_TYPE="x86" ;; esac KERNEL_URL="http://snapshots.linaro.org/kernel-hwpack/linux-linaro-lng-v4.1/${hwpack}/$(wget -q --no-check-certificate -O - https://ci.linaro.org/job/linux-lng-v4.1/hwpack=${hwpack},label=docker-jessie-amd64/lastSuccessfulBuild/buildNumber)" DTB_URL=${KERNEL_URL}/dtbs export ROOTFS_BUILD_URL="http://snapshots.linaro.org/openembedded/images/odp-${arch}-gcc-${gcc_version}/${BUILD_NUMBER}/$(ls ${WORKSPACE}/out/linaro-image-lng-*.tar.gz |xargs basename)" STARTUP_NSH="${KERNEL_URL}/startup.nsh" cat << EOF > post_build_lava_parameters DEVICE_TYPE=${DEVICE_TYPE} BUNDLE_STREAM_NAME=${BUNDLE_STREAM_NAME} LAVA_SERVER=${LAVA_SERVER} KERNEL_URL=${KERNEL_URL} DTB_URL=${DTB_URL} STARTUP_NSH=${STARTUP_NSH} hwpack_type=${hwpack} ROOTFS_BUILD_URL=${ROOTFS_BUILD_URL} EOF - inject: properties-file: post_build_lava_parameters - shell: | #!/bin/bash set -ex template_file="template-base" case "${arch}" in armv7ab) template_file="template-be-base" ;; esac # Parse recipe and get GIT_URL/GIT_BRANCH/GIT_COMMIT export GIT_URL=$(grep "^SRC_URI =" ${WORKSPACE}/meta-linaro/meta-linaro/recipes-extra/odp/odp_*.bb | cut -d'"' -f2 | cut -d';' -f1) export GIT_COMMIT=$(grep "^SRCREV_odp =" ${WORKSPACE}/meta-linaro/meta-linaro/recipes-extra/odp/odp_*.bb |cut -d'"' -f2 | cut -d'=' -f2) mkdir -p ${WORKSPACE}/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 export test=oe-vald export DIST=openembedded export TARGET_TYPE=oe export TESTDEF_FILE="common/odp-validation" export ROOTFS_TYPE=odp-${arch}-gcc-${gcc_version} export SKIP_INSTALL=all ./lci-build-tools/yaml-to-json.py configs/odp/lava-job-definitions/${DEVICE_TYPE}/${template_file}.yaml > ${WORKSPACE}/out/lava/${template_file}.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 \ --api_version 3 \ --link-latest ${WORKSPACE}/out openembedded/images/odp-${arch}-gcc-${gcc_version}/${BUILD_NUMBER} - inject: properties-file: post_build_lava_parameters - conditional-step: condition-kind: strings-match condition-string1: '${ENV,var="arch"}' condition-string2: 'armv7a' steps: - trigger-builds: - project: 'odp-armv7a-test-definitions' predefined-parameters: UPSTREAM_BUILD_NUMBER=${BUILD_NUMBER} block: true - conditional-step: condition-kind: strings-match condition-string1: '${ENV,var="arch"}' condition-string2: 'armv7ab' steps: - trigger-builds: - project: 'odp-armv7ab-test-definitions' predefined-parameters: UPSTREAM_BUILD_NUMBER=${BUILD_NUMBER} block: true - conditional-step: condition-kind: strings-match condition-string1: '${ENV,var="arch"}' condition-string2: 'armv8' steps: - trigger-builds: - project: 'odp-armv8-test-definitions' predefined-parameters: UPSTREAM_BUILD_NUMBER=${BUILD_NUMBER} block: true - conditional-step: condition-kind: strings-match condition-string1: '${ENV,var="arch"}' condition-string2: 'x86-64' steps: - trigger-builds: - project: 'odp-x86-64-test-definitions' predefined-parameters: UPSTREAM_BUILD_NUMBER=${BUILD_NUMBER} block: true publishers: - email: recipients: 'fathi.boudra@linaro.org anders.roxell@linaro.org'