diff options
| -rwxr-xr-x | leap-repo-updated | 27 | 
1 files changed, 14 insertions, 13 deletions
diff --git a/leap-repo-updated b/leap-repo-updated index 6935e19..d9c9d7d 100755 --- a/leap-repo-updated +++ b/leap-repo-updated @@ -1,19 +1,27 @@  #!/bin/sh  leap_cli_updated() { -  # only test on develop for now -  cfg='/etc/leap/rewire_develop.cfg'  +  do_testdeploy '/etc/leap/rewire_master.cfg'  +  do_testdeploy '/etc/leap/rewire_develop.cfg'   }  leap_platform_updated() {    case $branch in -    'master') cfg='/etc/leap/rewire_master.cfg' ;; -    'develop') cfg='/etc/leap/rewire_develop.cfg' ;; -    'test_ci') cfg='/etc/leap/rewire_develop.cfg' ;; +    'master') do_testdeploy '/etc/leap/rewire_master.cfg' ;; +    'develop') do_testdeploy '/etc/leap/rewire_develop.cfg' ;; +    'test_ci') do_testdeploy '/etc/leap/rewire_develop.cfg' ;;      *) echo "Branch $branch not recognized. exiting."; exit 1;;    esac  } +do_testdeploy() { +  cmd="/usr/local/bin/platform_test/leap-platform-test -c $1 --all reset_deploy" +  echo  "`date`: Branch \"$branch\" in repo \"$repo\" was updated" >> $LOG + +  name="leap-platform-test-`date +'%F-%H%M%S'`" +  echo "Running this cmd in a detatched screen session named $name: $cmd" | tee -a $LOG +  screen -s /bin/bash -S $name -d -m $cmd  +}  LOG='/var/log/leap/leap-repo-updated.log' @@ -24,14 +32,7 @@ branch=`echo $2 |  cut -d'/' -f 3`  case "$repo" in     'leap_platform') leap_platform_updated;;    'leap_cli') leap_cli_updated;; -  *) echo "Repo $repo not recognized. exiting."; exit 1;; +  *) echo "Repo \"$repo\" not recognized. exiting."; exit 1;;  esac -cmd="/usr/local/bin/platform_test/leap-platform-test -c $cfg --all reset_deploy" - -echo  "`date`: Branch \"$branch\" in repo \"$repo\" was updated" >> $LOG - -name="leap-platform-test-`date +'%F-%H%M%S'`" -echo "Running this cmd in a detatched screen session named $name: $cmd" | tee -a $LOG -screen -s /bin/bash -S $name -d -m $cmd   | 
