aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2017-03-24 16:04:54 -0400
committerMarco Platania <platania@research.att.com>2017-03-24 16:04:54 -0400
commitf1a955e5c1c80714195b456ab7145815738e3c66 (patch)
tree30e65fa3ae9c6e1b26893c108bb83da7dc5928be
parent1cd45f34a43d3305295469a3fc83863b524835c4 (diff)
update script/deploy.sh
Change-Id: I2c36e0ec0734f0e13a9934876fc2f2a938544363 Signed-off-by: Marco Platania <platania@research.att.com>
-rwxr-xr-xscripts/deploy.sh31
1 files changed, 21 insertions, 10 deletions
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
index 421220e6..088f66eb 100755
--- a/scripts/deploy.sh
+++ b/scripts/deploy.sh
@@ -3,15 +3,26 @@
set -x
########## Define parameters ##########
-VERSION="1.1.0-SNAPSHOT"
+source ${WORKSPACE}"/version.properties"
+BRANCH=$(echo ${WORKSPACE} | cut -d'-' -f2)
+if [[ $BRANCH == "master" ]]
+then
+ VERSION=$snapshot_version
+else
+ VERSION=$release_version
+fi
-PATH_TO_BOOT="/w/workspace/demo-master-merge-java/boot"
-PATH_TO_HEAT="/w/workspace/demo-master-merge-java/heat"
-PATH_TO_HEAT_MASTER="/w/workspace/demo-master-merge-java/heat/OpenECOMP"
-PATH_TO_HEAT_VFW="/w/workspace/demo-master-merge-java/heat/vFW"
-PATH_TO_HEAT_VLB="/w/workspace/demo-master-merge-java/heat/vLB"
-PATH_TO_VFW="/w/workspace/demo-master-merge-java/vnfs/vFW/scripts"
-PATH_TO_VLB="/w/workspace/demo-master-merge-java/vnfs/vLB/scripts"
+echo "Workspace: " ${WORKSPACE}
+echo "Gerrit branch: " $BRANCH
+echo "Version number: " $VERSION
+
+PATH_TO_BOOT=${WORKSPACE}"/boot"
+PATH_TO_HEAT=${WORKSPACE}"/heat"
+PATH_TO_HEAT_MASTER=${WORKSPACE}"/heat/OpenECOMP"
+PATH_TO_HEAT_VFW=${WORKSPACE}"/heat/vFW"
+PATH_TO_HEAT_VLB=${WORKSPACE}"/heat/vLB"
+PATH_TO_VFW=${WORKSPACE}"/vnfs/vFW/scripts"
+PATH_TO_VLB=${WORKSPACE}"/vnfs/vLB/scripts"
BOOT_GROUP_ID="org.openecomp.demo/boot"
HEAT_GROUP_ID="org.openecomp.demo/heat"
@@ -33,8 +44,8 @@ cd $PATH_TO_BOOT
ls | xargs -I{} curl -vk --netrc-file "${NETRC}" --upload-file {} $REPO_URL/$BOOT_GROUP_ID/$VERSION/{}
cd $PATH_TO_HEAT
-curl -vk --netrc-file "${NETRC}" --upload-file README.md $REPO_URL/$HEAT_GROUP_ID/
-curl -vk --netrc-file "${NETRC}" --upload-file LICENSE.TXT $REPO_URL/$HEAT_GROUP_ID/
+curl -vk --netrc-file "${NETRC}" --upload-file $PATH_TO_HEAT/README.md $REPO_URL/$HEAT_GROUP_ID/
+curl -vk --netrc-file "${NETRC}" --upload-file $PATH_TO_HEAT/LICENSE.TXT $REPO_URL/$HEAT_GROUP_ID/
cd $PATH_TO_HEAT_MASTER
ls | xargs -I{} curl -vk --netrc-file "${NETRC}" --upload-file {} $REPO_URL/$HEAT_MASTER_GROUP_ID/$VERSION/{}