comparison build_upload_nightly @ 1252:8e3adc6264d3

Don't depend on USER being set in build_nightly as it does not seem to work when build job is run from cron
author Michael Pavone <pavone@retrodev.com>
date Mon, 27 Feb 2017 00:38:53 -0800
parents f249fd91b0f5
children 0d942ecf38c5
comparison
equal deleted inserted replaced
1251:f249fd91b0f5 1252:8e3adc6264d3
7 if [ $? -ne 0 ]; then 7 if [ $? -ne 0 ]; then
8 exit $? 8 exit $?
9 fi 9 fi
10 sleep 10 10 sleep 10
11 echo Starting build by $BUILD_USER in $CONTAINER_NAME 11 echo Starting build by $BUILD_USER in $CONTAINER_NAME
12 lxc-attach -n "$CONTAINER_NAME" -- /home/$BUILD_USER/blastem/build_nightly $BUILD_USER 2>&1 > /tmp/build_${name}_out.log 12 lxc-attach -n "$CONTAINER_NAME" -- /home/$BUILD_USER/blastem/build_nightly $BUILD_USER needsu 2>&1 > /tmp/build_${name}_out.log
13 result=$? 13 result=$?
14 if [ $result -ne 0 ]; then 14 if [ $result -ne 0 ]; then
15 echo Build falied with return code $result stopping $CONTAINER_NAME 15 echo Build falied with return code $result stopping $CONTAINER_NAME
16 lxc-stop -n "$CONTAINER_NAME" 16 lxc-stop -n "$CONTAINER_NAME"
17 exit $? 17 exit $result
18 fi 18 fi
19 echo "Build succeeded, stopping $CONTAINER_NAME" 19 echo "Build succeeded, stopping $CONTAINER_NAME"
20 lxc-stop -n "$CONTAINER_NAME" 20 lxc-stop -n "$CONTAINER_NAME"
21 . $HOME/remote.params 21 . $HOME/remote.params
22 artifact=$(tail -n 1 /tmp/build_${name}_out.log) 22 artifact=$(tail -n 1 /tmp/build_${name}_out.log)