summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJames Gu <james.gu@att.com>2020-11-20 16:13:16 -0800
committerJames Gu <james.gu@att.com>2020-11-23 06:46:58 -0800
commit3fa4f1beb6c12c719062d2f43d6c97233912960c (patch)
treef52a5a77d6fead1091a64bb82d3cfedb4affa62c /tools
parent06a9607c23faae93e9e95c4fec4f8f1566841279 (diff)
Removed hard coded reference to treasuremap gerrit repo
Removed hard coded reference to treasuremap gerrit repo in deploy script in favor of the global repo url defined in site definiton yaml. Signed-off-by: James Gu <james.gu@att.com> Change-Id: I67cb889174d04a6e18b454b552d31e59d2f2fd30
Diffstat (limited to 'tools')
-rwxr-xr-xtools/deploy.sh27
1 files changed, 15 insertions, 12 deletions
diff --git a/tools/deploy.sh b/tools/deploy.sh
index b27607e..b5b97a2 100755
--- a/tools/deploy.sh
+++ b/tools/deploy.sh
@@ -76,8 +76,8 @@ read_yaml() {
}
git_checkout() {
- git clone $1
- cd ${1##*/}
+ git clone $1 $3
+ cd $3
# check refs for patchsets
if [[ $2 == *"refs"* ]]; then
@@ -96,18 +96,23 @@ clone_repos() {
echo "Found existing airship folder. Skip repo clone."
else
# clone/checkout site manifests
- git_checkout 'https://gerrit.opnfv.org/gerrit/airship' $GERRIT_REFSPEC
+ git_checkout 'https://gerrit.opnfv.org/gerrit/airship' $GERRIT_REFSPEC airship
fi
if [ -d "treasuremap" ]; then
echo "Found existing treasuremap folder in the working directory. Skip repo clone."
else
- # clone treasuremap (only required for tools/airship)
+ # clone treasuremap
# match treasuremap to global from site-definition
- SITE_DEF_KEY="['data']['repositories']['global']['revision']"
- TREASUREMAP_REF=$(read_yaml $SITE_DEF "$SITE_DEF_KEY")
+ GLOBAL_URL_KEY="['data']['repositories']['global']['url']"
+ TREASUREMAP_URL=$(read_yaml $SITE_DEF "$GLOBAL_URL_KEY")
+ echo "TREASUREMAP_URL $TREASUREMAP_URL"
+
+ GLOBAL_REF_KEY="['data']['repositories']['global']['revision']"
+ TREASUREMAP_REF=$(read_yaml $SITE_DEF "$GLOBAL_REF_KEY")
echo "TREASUREMAP_REF $TREASUREMAP_REF"
- git_checkout 'https://review.opendev.org/airship/treasuremap' $TREASUREMAP_REF
+
+ git_checkout $TREASUREMAP_URL $TREASUREMAP_REF treasuremap
fi
}
@@ -255,7 +260,9 @@ case "$2" in
pre_genesis
genesis_deploy
site_action $2
-# create_public_network
+ create_cirros_image
+ create_dpdk_flavor
+ create_public_network
;;
'update_site')
clone_repos
@@ -268,10 +275,6 @@ case "$2" in
site_action $2
;;
'init_cloud')
-# wget http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
-# openstack image create --disk-format qcow2 --container-format bare --public --file /target/cirros-0.5.1-x86_64-disk.img cirros
-# rm -rf cirros-0.5.1-x86_64-disk.img cirros
-# openstack flavor create --ram 1024 --disk 1 --vcpus 1 --public --hw:mem_page_size=large dpdk.tiny
create_cirros_image
create_dpdk_flavor
create_public_network