X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=tools%2Fsingle_step_deploy.sh;h=e76bc9dc51836ca55353078ec198e72e76db801e;hb=d7d4c2ffe5721bdfde00bc622061e50a4ea7af7e;hp=8fe225ddce6806785a3ec24d6559e2f6fc4022d1;hpb=8ca1343f22312d9711b92fed95ad52655842451a;p=yaml_builds.git diff --git a/tools/single_step_deploy.sh b/tools/single_step_deploy.sh old mode 100644 new mode 100755 index 8fe225d..e76bc9d --- a/tools/single_step_deploy.sh +++ b/tools/single_step_deploy.sh @@ -1,6 +1,6 @@ #!/bin/bash ############################################################################## -# Copyright © 2018 AT&T Intellectual Property. All rights reserved. # +# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"); you may # # not use this file except in compliance with the License. # @@ -15,10 +15,11 @@ # limitations under the License. # ############################################################################## +set -x if [ -z "$1" ] then - echo "Plese pass site name as command line argument" + echo "Please pass site name as command line argument" exit -2 else export SITE=${SITE:-$1} @@ -30,7 +31,8 @@ TIMESTAMP=$(date +"%Y%m%d%H%M") echo "TIMESTAMP=$TIMESTAMP" echo "Validating the setup and generating the tar file" -bash $YAML_BUILDS/tools/1prom-gen.sh $SITE > /var/log/yaml_builds/1prom-gen-$TIMESTAMP.log 2>&1 +mkdir -p /var/log/akraino +bash $YAML_BUILDS/tools/1prom-gen.sh $SITE if [ $? -ne 0 ] then echo "Error:Could not generate tar file. So stopping here" @@ -38,7 +40,7 @@ then fi echo "Bringing up the genesis node" -bash $YAML_BUILDS/tools/2genesis.sh $SITE > /var/log/yaml_builds/2genesis-$TIMESTAMP.log 2>&1 +bash $YAML_BUILDS/tools/2genesis.sh $SITE if [ $? -ne 0 ] then echo "Error:Could not bringup the genesis nodes. So stopping here" @@ -46,7 +48,7 @@ then fi echo "Deploying the site" -bash $YAML_BUILDS/tools/3deploy_site.sh $SITE > /var/log/yaml_builds/3deploy-$TIMESTAMP.log 2>&1 +bash $YAML_BUILDS/tools/3deploy_site.sh $SITE if [ $? -ne 0 ] then echo "Error:Could not deploy the site."