Renaming scripts folder 79/579/1
authorplatania <platania@research.att.com>
Thu, 16 Feb 2017 23:00:15 +0000 (18:00 -0500)
committerplatania <platania@research.att.com>
Thu, 16 Feb 2017 23:02:42 +0000 (18:02 -0500)
Change-Id: Ie47a38d5f320a8d273bb3bb8c2a6b8dbbed655b5
Signed-off-by: platania <platania@research.att.com>
deploy_scripts/repo_config.txt [deleted file]
scripts/.DS_Store [moved from deploy_scripts/.DS_Store with 100% similarity]
scripts/deploy.sh [new file with mode: 0755]
scripts/deploy_boot.sh [moved from deploy_scripts/deploy_boot.sh with 100% similarity]
scripts/deploy_heat.sh [moved from deploy_scripts/deploy_heat.sh with 100% similarity]
scripts/deploy_vfw_scripts.sh [moved from deploy_scripts/deploy_vfw_scripts.sh with 100% similarity]
scripts/deploy_vlb_scripts.sh [moved from deploy_scripts/deploy_vlb_scripts.sh with 100% similarity]

diff --git a/deploy_scripts/repo_config.txt b/deploy_scripts/repo_config.txt
deleted file mode 100644 (file)
index 8430dd4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-REPO_URL=https://ecomp-nexus:8443/repository/raw
-REPO_USERNAME=
-REPO_PASSWORD=
-
similarity index 100%
rename from deploy_scripts/.DS_Store
rename to scripts/.DS_Store
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
new file mode 100755 (executable)
index 0000000..3cfe194
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+########## Define parameters ##########
+VERSION="1.0.0"
+
+PATH_TO_BOOT="../boot"
+PATH_TO_HEAT="../heat"
+PATH_TO_VFW="../vnfs/vFW/scripts"
+PATH_TO_VLB="../vnfs/vLB/scripts"
+
+BOOT_GROUP_ID="org.openecomp.demo.boot"
+HEAT_GROUP_ID="org.openecomp.demo.heat"
+VFW_GROUP_ID="org.openecomp.demo.vnfs.vfw"
+VLB_GROUP_ID="org.openecomp.demo.vnfs.vlb"
+
+#NEXUSPROXY=https://nexus.openecomp.org
+REPO_URL="${NEXUSPROXY}/content/sites/raw"
+USER=$(xpath -q -e "//servers/server[id='ecomp-raw']/username/text()" "$SETTINGS_FILE")
+PASS=$(xpath -q -e "//servers/server[id='ecomp-raw']/password/text()" "$SETTINGS_FILE")
+NETRC=$(mktemp)
+echo "machine nexus.openecomp.org login ${USER} password ${PASS}" > "${NETRC}"
+#######################################
+
+##### Upload scripts into Nexus raw repository #####
+cd $PATH_TO_BOOT
+ls | xargs -I{} curl -k --netrc-file '${NETRC}' --upload-file {} $REPO_URL/$BOOT_GROUP_ID/$VERSION/{}
+
+cd $PATH_TO_HEAT
+ls | xargs -I{} curl -k --netrc-file '${NETRC}' --upload-file {} $REPO_URL/$HEAT_GROUP_ID/$VERSION/{}
+
+cd $PATH_TO_VFW
+ls | xargs -I{} curl -k --netrc-file '${NETRC}' --upload-file {} $REPO_URL/$VFW_GROUP_ID/$VERSION/{}
+
+cd $PATH_TO_VLB
+ls | xargs -I{} curl -k --netrc-file '${NETRC}' --upload-file {} $REPO_URL/$VLB_GROUP_ID/$VERSION/{}
+####################################################