From f1a955e5c1c80714195b456ab7145815738e3c66 Mon Sep 17 00:00:00 2001 From: Marco Platania Date: Fri, 24 Mar 2017 16:04:54 -0400 Subject: update script/deploy.sh Change-Id: I2c36e0ec0734f0e13a9934876fc2f2a938544363 Signed-off-by: Marco Platania --- scripts/deploy.sh | 31 +++++++++++++++++++++---------- 1 file 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/{} -- cgit 1.2.3-korg