diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2014-11-24 12:14:39 +0530 |
---|---|---|
committer | Vishal Bhoj <vishal.bhoj@linaro.org> | 2014-12-03 19:43:54 +0530 |
commit | 087fcf465cf34daad5264b13b5a26b2f102fc88d (patch) | |
tree | a9a71c2fc63de4838efcacd20c5136f09ef87f1a /node/lava-submit | |
parent | 38551da1b627dcd9cf31008aa538ce11adc69eaa (diff) |
Change-Id: I5ee21bb42ccee882de3c852014e7a78d52e424c8
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
Diffstat (limited to 'node/lava-submit')
-rwxr-xr-x | node/lava-submit | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/node/lava-submit b/node/lava-submit index 23a17b3..b06ddd9 100755 --- a/node/lava-submit +++ b/node/lava-submit @@ -9,14 +9,21 @@ ############################################################################### set -xe - BUILD_SCRIPT_ROOT=$(readlink -f "$(dirname "${0}")/../build-scripts") +source "${BUILD_SCRIPT_ROOT}"/helpers cd build -sudo -E -H -u jenkins-build bash -xes "${BUILD_SCRIPT_ROOT}" "$@" <<\EOF + +if is_on_ec2; then + exec_cmd="sudo -E -H -u jenkins-build bash" +else + exec_cmd="bash" +fi +$exec_cmd -xes "${BUILD_SCRIPT_ROOT}" "$@" <<\EOF export BUILD_SCRIPT_ROOT="${1}" set -a -source /var/run/build-tools/build-config +source "${BUILD_SCRIPT_ROOT}"/helpers +source $(get_build_config)/build-tools/build-config set +a if [ -z "$LAVA_SUBMIT" -o "$LAVA_SUBMIT" = "0" ]; then |