- job: name: odp-api-check-gerrit project-type: matrix defaults: global properties: - authorization: anonymous: - job-read - job-extended-read linaro: - job-read - job-extended-read - job-build - job-cancel - build-discarder: num-to-keep: 30 days-to-keep: 30 disabled: false node: master child-workspace: . display-name: 'ODP API check for Gerrit' triggers: - gerrit: server-name: 'review.linaro.org' override-votes: true gerrit-build-successful-verified-value: 1 gerrit-build-failed-verified-value: -1 gerrit-build-successful-codereview-value: 1 gerrit-build-failed-codereview-value: -1 readable-message: true successful-message: 'Sanity check OK' failure-message: '[OUTPUT]:' failure-message-file: 'build-error.txt' trigger-for-unreviewed-patches: true projects: - project-compare-type: 'ANT' project-pattern: 'lng/odp' branches: - branch-compare-type: 'ANT' branch-pattern: '**' axes: - axis: type: user-defined name: ARCH values: - x86-64 - arm - armeb - arm64 - arm64be - axis: type: slave name: label values: - docker-jessie-amd64 - docker-jessie-arm64 execution-strategy: combination-filter: | !(label=="docker-jessie-arm64" && (ARCH=="x86-64" || ARCH=="arm" || ARCH=="armeb" || ARCH=="arm64be")) wrappers: - timestamps builders: - linaro-publish-token - shell: | #!/bin/bash set -ex echo "#${BUILD_NUMBER}-${GERRIT_PATCHSET_REVISION:0:8}" > ${WORKSPACE}/version.txt rm -rf odp check-odp git clone -b ${GERRIT_BRANCH} https://git.linaro.org/${GERRIT_PROJECT} odp git clone --depth 1 https://git.linaro.org/lng/check-odp.git check-odp ${WORKSPACE}/check-odp/pre-install.sh sudo apt-get install -y python-requests export tcbindir="${HOME}/srv/toolchain/${ARCH}-tc-16.02/bin" case "${ARCH}" in x86-64) unset ARCH ;; esac case "${label}" in docker-jessie-arm64) unset ARCH ;; esac export GIT_URL=file://${WORKSPACE}/odp export GIT_BRANCH=${GERRIT_BRANCH} set +e bash -x ${WORKSPACE}/check-odp/build.sh retcode=$? set -e # Move log files if [ -d check-odp/build/odp/testdir/ ]; then mkdir -p ${WORKSPACE}/out/log && find check-odp/build/odp/testdir/ -type f -name '*.log' -exec cp {} ${WORKSPACE}/out/log \; fi # 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 if [ -d ${WORKSPACE}/out ]; then PUB_DEST=components/lng/odp/odp-api-check/${GERRIT_BRANCH}/${label}/${BUILD_NUMBER} time python ${HOME}/bin/linaro-cp.py --api_version 3 --link-latest ${WORKSPACE}/out ${PUB_DEST} echo "***************************" echo "Logs published on http://snapshots.linaro.org/${PUB_DEST}" echo "***************************" fi if [ ${retcode} -ne 0 ]; then exit 1 else exit 0 fi - build-name-setter: name: 'version.txt' file: true