#!/bin/bash ############################################################################### # Copyright (c) 2011 Linaro # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html ############################################################################### set -xe BUILD_SCRIPT_ROOT=$(readlink -f "$(dirname "${0}")/../build-scripts") cd build sudo -E -H -u jenkins-build bash -xes "${BUILD_SCRIPT_ROOT}" "$@" <<\EOF export BUILD_SCRIPT_ROOT="${1}" set -a source /var/run/build-tools/build-config set +a if [ -z "$LAVA_SUBMIT" -o "$LAVA_SUBMIT" = "0" ]; then exit; fi if ! "${BUILD_SCRIPT_ROOT}"/post-build-lava.py; then if [ "$LAVA_SUBMIT_FATAL" != "0" ]; then exit 1 else echo "warning: LAVA submission failed" fi fi # There should be one and only BUILD-INFO.txt per build, and it should # include ACLs for all files at once. ## Add BUILD-INFO.txt support for lava-job-info files #cp ${BUILD_SCRIPT_ROOT}/BUILD-INFO_lava.txt out/BUILD-INFO.txt EOF