Change seed code version to 0.0.1
[yaml_builds.git] / tools / generate_yamls.sh
index 4528442..d258b56 100644 (file)
@@ -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.                   #
 # limitations under the License.                                             #
 ##############################################################################
 
+set -x
 
 source $(dirname $0)/setenv.sh
 
-if [ -z "$AIC_CLCP_MANIFESTS" ]
+if [ -z "$AIRSHIP_TREASUREMAP" ]
 then
-  echo "Please follow https://codecloud.web.att.com/projects/ST_CCP/repos/aic-clcp-manifests/browse/docs/source/deployment_blueprint.md to clone aic-clcp-manifests. Also export AIC_CLCP_MANIFESTS to it."
-  exit -1
-fi
-
-if [ -z "$AIC_CLCP_SECURITY_MANIFESTS" ]
-then
-  echo "Please follow https://codecloud.web.att.com/projects/ST_CCP/repos/aic-clcp-manifests/browse/docs/source/deployment_blueprint.md to clone aic-clcp-security-manifests. Also export AIC_CLCP_SECURITY_MANIFESTS to it."
+  echo "Please use https://git.openstack.org/openstack/airship-treasuremap to clone airship_treasuremap. Also set AIRSHIP_TREASUREMAP to it."
   exit -1
 fi
 
 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
   SITE=${SITE:-$1}
@@ -40,7 +35,6 @@ else
 fi
 
 cd $YAML_BUILDS
-python ./scripts/jcopy.py $SITE.yaml ./templates/aic-clcp-manifests $AIC_CLCP_MANIFESTS/site/$SITE
-python ./scripts/jcopy.py $SITE.yaml ./templates/aic-clcp-security-manifests $AIC_CLCP_SECURITY_MANIFESTS/site/$SITE
-python ./scripts/jcopy.py $SITE.yaml ./templates/yaml_builds/set_site_env.sh ./tools/
-mv ./tools/set_site_env.sh ./tools/env_$SITE.sh
+python ./scripts/jcopy.py $SITE.yaml ./templates $YAML_BUILDS/site/$SITE
+python ./scripts/jcopy.py $SITE.yaml ./tools/j2/set_site_env.sh ./tools/env_$SITE.sh
+cp -r site/common/* site/$SITE/