diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2018-02-21 11:55:04 +0000 |
---|---|---|
committer | Dan Rue <dan.rue@linaro.org> | 2018-02-22 14:08:28 +0000 |
commit | d5e067051c6306af6547c266a9b1ca1ce506b708 (patch) | |
tree | 519ba8c2a8845f571edac25125464cc79df6a7ce /lkft-staging-lava.yaml | |
parent | dfd797e2ebfadd7b52fd0a2c501a4401790d7752 (diff) |
lkft-staging: send test jobs to staging-lkft LAVA instance
In order to avoid queue building up, first iteration will only submit
linux-mainline test jobs. Jobs will run on lkft-staging.v.l.o LAVA
instance and will be reported to staging-qa-reports. This way we can
easier promote working software from staging to production instances.
Change-Id: I8a0d05eb61d23fa52497fd304be869ecb73ff729
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
Diffstat (limited to 'lkft-staging-lava.yaml')
-rw-r--r-- | lkft-staging-lava.yaml | 234 |
1 files changed, 234 insertions, 0 deletions
diff --git a/lkft-staging-lava.yaml b/lkft-staging-lava.yaml new file mode 100644 index 0000000000..cb2b0cdd5b --- /dev/null +++ b/lkft-staging-lava.yaml @@ -0,0 +1,234 @@ +- job: + name: lkft-staging-lava + project-type: matrix + defaults: global + properties: + - authorization: + anonymous: + - job-read + - job-extended-read + - job-workspace + linaro: + - job-read + - job-extended-read + - job-build + - job-cancel + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + artifact-num-to-keep: 1 + parameters: + - string: + name: KSELFTESTS_SKIPLIST + default: "breakpoint_test breakpoint_test_arm64 step_after_suspend_test ftracetest" + disabled: false + node: master + display-name: 'LKFT - Staging LAVA instance' + description: 'This job submits latest available LKFT builds for testing in lkft-staging.validation.linaro.org instance. By default staging-qa-reports.lianro.org is used to track and report the results.' + triggers: + # trigger every Saturday + - timed: 'H 0 * * 6' + axes: + - axis: + type: user-defined + name: BUILD_NAME + values: + #- 'linux-next' + - 'linux-mainline' + #- 'linux-stable-4.4' + #- 'linux-stable-4.9' + #- 'linux-stable-4.14' + - axis: + type: user-defined + name: QA_SERVER + values: + - 'https://staging-qa-reports.linaro.org' + - axis: + type: user-defined + name: DEVICE_TYPE + values: + - 'hi6220-hikey' + #- 'x86' + - 'juno-r2' + - 'x15' + - 'b2260' + - 'dragonboard-410c' + - 'qemu_arm64' + - 'qemu_x86_64' + execution-strategy: + sequential: false + wrappers: + - timestamps + - ssh-agent-credentials: + users: + - 'OE_COMMIT_BOT_KEY' + - credentials-binding: + - text: + credential-id: QA_REPORTS_TOKEN + variable: QA_REPORTS_TOKEN + builders: + - shell: | + #!/bin/bash + + # install required python modules + pip install --user --force-reinstall Jinja2 requests urllib3 ruamel.yaml + + # no LTS 4.4 build for hikey + if [ ${DEVICE_TYPE} = hi6220-hikey ] && [ ${BUILD_NAME} = linux-stable-4.4 ] + then + exit 0 + fi + # no LTS 4.4 build for QEMU (Hikey build is used) + if [ ${DEVICE_TYPE} = qemu_arm64 ] && [ ${BUILD_NAME} = linux-stable-4.4 ] + then + exit 0 + fi + # no LTS 4.4 build for dragonboard + if [ ${DEVICE_TYPE} = dragonboard-410c ] && [ ${BUILD_NAME} = linux-stable-4.4 ] + then + exit 0 + fi + export LAVA_SERVER=https://lkft-staging.validation.linaro.org/RPC2/ + + case ${DEVICE_TYPE} in + hi6220-hikey) + export MACHINE=hikey + ;; + juno-r2) + export MACHINE=juno + ;; + x15) + export MACHINE=am57xx-evm + ;; + x86) + export MACHINE=intel-core2-32 + ;; + b2260) + export MACHINE=stih410-b2260 + ;; + dragonboard-410c) + export MACHINE=dragonboard-410c + ;; + qemu_arm64) + export MACHINE=hikey + ;; + qemu_x86_64) + export MACHINE=intel-core2-32 + ;; + *) + ;; + esac + export PUB_DEST=${BUILD_NAME} + export DISTRO=rpb + export MANIFEST_BRANCH=morty + export SNAPSHOTS_URL=https://snapshots.linaro.org + export BASE_URL=openembedded/lkft/${MANIFEST_BRANCH}/${MACHINE}/${DISTRO}/${BUILD_NAME}/latest + export ENVIRONMENT=staging + + export SNAPSHOTS_BASE_URL=${SNAPSHOTS_URL}/${BASE_URL} + + # retrieve build specific details + MD5_FILENAME="MD5SUMS.txt" + BUILD_CONFIG="build_config.json" + wget -O "${MD5_FILENAME}" "${SNAPSHOTS_BASE_URL}/${MD5_FILENAME}" + wget -O "${BUILD_CONFIG}" "${SNAPSHOTS_BASE_URL}/${BUILD_CONFIG}" + rm build_env.sh + for ENVVAR in $(jq --raw-output 'to_entries[] | "\(.key | ascii_upcase)=\(.value | sub("[[:space:]]+"; "_"))"' < build_config.json) + do + echo "export ${ENVVAR}" >> build_env.sh + done + . ./build_env.sh + ROOTFS_FILENAME=$(grep -E "rpb-console-image-${MACHINE}-[0-9]{14}-[0-9]+\.rootfs\.img\.gz" "${MD5_FILENAME}" | awk '{print $2}') + NFS_FILENAME=$(grep -E "rpb-console-image-${MACHINE}-[0-9]{14}-[0-9]+\.rootfs\.tar\.xz" "${MD5_FILENAME}" | awk '{print $2}') + EXT4_IMAGE_FILENAME=$(grep -E "rpb-console-image-${MACHINE}-[0-9]{14}-[0-9]+\.rootfs\.ext4\.gz" "${MD5_FILENAME}" | awk '{print $2}') + BOOT_FILENAME=$(grep -E "boot\S*uefi\.img" "${MD5_FILENAME}" | awk '{print $2}') + KERNEL_FILENAME=$(grep -E "bzImage" "${MD5_FILENAME}" | awk '{print $2}') + HDD_IMG=$(grep -E "rpb-console-image-${MACHINE}-[0-9]{14}-[0-9]+\.hddimg" "${MD5_FILENAME}" | awk '{print $2}') + case ${DEVICE_TYPE} in + juno-r2) + KERNEL_FILENAME=$(grep -E "Image.*.bin" "${MD5_FILENAME}" | awk '{print $2}') + DTB_FILENAME=$(grep -E "Image.*juno-r2.*.dtb" "${MD5_FILENAME}" | awk '{print $2}') + ;; + b2260) + KERNEL_FILENAME=$(grep -E "uImage.*.bin" "${MD5_FILENAME}" | awk '{print $2}') + DTB_FILENAME=$(grep -E "uImage.*.dtb" "${MD5_FILENAME}" | awk '{print $2}') + ;; + dragonboard-410c) + BOOT_FILENAME=$(grep -E "boot\S*\.img" "${MD5_FILENAME}" | awk '{print $2}') + ;; + qemu_arm64) + KERNEL_FILENAME=$(grep -E "Image.*.bin" "${MD5_FILENAME}" | awk '{print $2}') + DTB_FILENAME=$(grep -E "Image.*.dtb" "${MD5_FILENAME}" | awk '{print $2}') + ;; + *) + ;; + esac + case ${BUILD_NAME} in + linux-next) + export KSELFTESTS_VERSION=${MAKE_KERNELVERSION} + export KSELFTESTS_REVISION=${KERNEL_COMMIT_ID} + export KSELFTESTS_URL=${KERNEL_REPO} + export KSELFTEST_PATH=/opt/kselftests/default-in-kernel/ + ;; + linux-mainline) + export KSELFTESTS_VERSION=${MAKE_KERNELVERSION} + export KSELFTESTS_REVISION=${KERNEL_COMMIT_ID} + export KSELFTESTS_URL=${KERNEL_REPO} + export KSELFTEST_PATH=/opt/kselftests/default-in-kernel/ + ;; + *) + export KSELFTESTS_VERSION=${KSELFTEST_MAINLINE_VERSION} + export KSELFTESTS_REVISION=${KSELFTEST_MAINLINE_VERSION} + export KSELFTESTS_URL=${KSELFTEST_MAINLINE_URL} + export KSELFTEST_PATH=/opt/kselftests/mainline/ + ;; + esac + export NFSROOTFS_URL="${BUILD_LOCATION}/${NFS_FILENAME}" + export EXT4_IMAGE_URL="${BUILD_LOCATION}/${EXT4_IMAGE_FILENAME}" + export BOOT_URL="${BUILD_LOCATION}/${BOOT_FILENAME}" + export SYSTEM_URL="${BUILD_LOCATION}/${ROOTFS_FILENAME}" + export KERNEL_COMMIT=${KERNEL_COMMIT_ID} + export LAVA_JOB_PRIORITY=low + export KERNEL_CONFIG_URL=${BUILD_LOCATION}/config + export KERNEL_VERSION=${MAKE_KERNELVERSION} + export KERNEL_DEFCONFIG_URL=${BUILD_LOCATION}/defconfig + export KERNEL_URL="${BUILD_LOCATION}/${KERNEL_FILENAME}" + export DTB_URL="${BUILD_LOCATION}/${DTB_FILENAME}" + export BUILD_URL=${BUILD_LOCATION} + export RECOVERY_IMAGE_URL=${BUILD_LOCATION}/juno-oe-uboot.zip + export HDD_URL=${BUILD_LOCATION}/${HDD_IMG} + rm build_env.sh + rm ${MD5_FILENAME} + rm ${BUILD_CONFIG} + export LAVA_JOB_PRIORITY="low" + + rm -rf configs + git clone --depth 1 http://git.linaro.org/ci/job/configs.git + + for test in $(ls configs/openembedded-lkft/lava-job-definitions/testplan); do + TEST_TEMPLATES="${TEST_TEMPLATES} testplan/${test}" + done + if [ ! -z "${KERNEL_DESCRIBE}" ]; then + export QA_BUILD_VERSION=${KERNEL_DESCRIBE} + else + export QA_BUILD_VERSION=${KERNEL_COMMIT:0:12} + fi + + env + python configs/openembedded-lkft/submit_for_testing.py \ + --device-type ${DEVICE_TYPE} \ + --build-number ${BUILD_NUMBER} \ + --lava-server ${LAVA_SERVER} \ + --qa-server ${QA_SERVER} \ + --qa-server-team staging-lkft \ + --qa-server-project ${BUILD_NAME} \ + --git-commit ${QA_BUILD_VERSION} \ + --test-plan ${TEST_TEMPLATES} + publishers: + - groovy-postbuild: + script: + !include-raw: openembedded-lkft/postbuild.groovy + - email-ext: + recipients: 'lkft-triage@lists.linaro.org' + matrix-trigger: only-configurations + subject: '[CI] staging (LAVA instance) ${BUILD_NAME}: ${DEVICE_TYPE} - ${BUILD_STATUS}' |