diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2011-12-20 21:48:39 +0200 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2011-12-20 21:48:39 +0200 |
commit | f16ba6339a94a29de8b50a6f07325c783dc2b6b3 (patch) | |
tree | 74ae773a42de833facb5b4bb68045e59dc75bfc7 /node | |
parent | 821bbe0807f61a257fde127f8ba77c2dec30f316 (diff) |
LAVA submit wrapper script for standalone build step.
Diffstat (limited to 'node')
-rwxr-xr-x | node/lava-submit | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/node/lava-submit b/node/lava-submit new file mode 100755 index 0000000..d3e7a11 --- /dev/null +++ b/node/lava-submit @@ -0,0 +1,36 @@ +#!/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 + +if [ -z "$LAVA_SUBMIT" || "$LAVA_SUBMIT" == 0]; then + exit; +fi + + +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}" +export CONFIGURATION="$(echo "${2}" | base64 -id)" +set -a +eval "$CONFIGURATION" +set +a + +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 + +EOF |