aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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/{}