summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2018-03-05 08:10:18 -0500
committerLusheng Ji <lji@research.att.com>2018-03-05 08:12:33 -0500
commit7ed337600a48307f368849da028d772f06e387e0 (patch)
treea3ef490cf104853b9f5e1234875ff39a428fdb6b
parent2b3d24bd5b513a5842adb9250b1840f9047a6d55 (diff)
Change CM plugin push location
1. change the wagon and type file push location to a path reflecting the release and version numbers 2. wagon create with -r 3. update the local mvn-phase-script to use local mvn-phase-lib Issue-ID: DCAEGEN2-206 Change-Id: Ib86ddab54e17128f893fa41f09c65ea93b800323 Signed-off-by: Lusheng Ji <lji@research.att.com>
-rwxr-xr-xmvn-phase-script.sh6
-rw-r--r--scripts/mvn-phase-lib.sh26
2 files changed, 11 insertions, 21 deletions
diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh
index 29290ca..7d432af 100755
--- a/mvn-phase-script.sh
+++ b/mvn-phase-script.sh
@@ -36,11 +36,7 @@ fi
export SETTINGS_FILE=${SETTINGS_FILE:-$HOME/.m2/settings.xml}
set +e
-if ! wget -O ${PROJECT_ROOT}/mvn-phase-lib.sh \
- "$MVN_RAWREPO_BASEURL_DOWNLOAD"/org.onap.dcaegen2.utils/releases/scripts/mvn-phase-lib.sh; then
- cp "${PROJECT_ROOT}"/scripts/mvn-phase-lib.sh "${PROJECT_ROOT}/mvn-phase-lib.sh"
-fi
-source "${PROJECT_ROOT}"/mvn-phase-lib.sh
+source "${PROJECT_ROOT}"/scripts/mvn-phase-lib.sh
# This is the base for where "deploy" will upload
diff --git a/scripts/mvn-phase-lib.sh b/scripts/mvn-phase-lib.sh
index ac755e0..9e3b84e 100644
--- a/scripts/mvn-phase-lib.sh
+++ b/scripts/mvn-phase-lib.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# ================================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -23,6 +23,9 @@
#MVN_PHASE="$2"
#PROJECT_ROOT=$(dirname $0)
+
+RELEASE_TAG="R2"
+
FQDN="${MVN_PROJECT_GROUPID}.${MVN_PROJECT_ARTIFACTID}"
if [ "$MVN_PROJECT_MODULEID" == "__" ]; then
MVN_PROJECT_MODULEID=""
@@ -247,7 +250,7 @@ build_wagons()
echo "In $PLUGIN_DIR, build plugin $PLUGIN_NAME, version $PLUGIN_VERSION"
- wagon create --format tar.gz "${PLUGIN_DIR}"
+ wagon create -r "${PLUGIN_DIR}/requirements.txt" --format tar.gz "${PLUGIN_DIR}"
PKG_FILE_NAMES=( "${PLUGIN_NAME}-${PLUGIN_VERSION}"*.wgn )
echo Built package: "${PKG_FILE_NAMES[@]}"
@@ -291,17 +294,9 @@ upload_raw_file()
else
PROJECT_NAME=${FQDN}
fi
- if [ "$MVN_DEPLOYMENT_TYPE" == 'SNAPSHOT' ]; then
- SEND_TO="${REPO}/${PROJECT_NAME}/snapshots"
- elif [ "$MVN_DEPLOYMENT_TYPE" == 'STAGING' ]; then
- SEND_TO="${REPO}/${PROJECT_NAME}/releases"
- else
- echo "Unreconfnized deployment type, quit"
- exit
- fi
- #if [ ! -z "$MVN_PROJECT_MODULEID" ]; then
- # SEND_TO="$SEND_TO/$MVN_PROJECT_MODULEID"
- #fi
+
+ SEND_TO="${REPO}/${PROJECT_NAME}/${RELEASE_TAG}"
+
if [ ! -z "$2" ]; then
SEND_TO="$SEND_TO/$2"
fi
@@ -346,9 +341,8 @@ upload_wagons_and_type_yamls()
exit -1
fi
- upload_raw_file "$NEWFILENAME" type_files/${PLUGIN_NAME}/${PLUGIN_VERSION_MAJOR}
- upload_raw_file "$NEWFILENAME" type_files/${PLUGIN_NAME}/${PLUGIN_VERSION_MAJOR_MINOR}
- upload_raw_file "${WAGONFILE_NAME}" "plugins/${PLUGIN_NAME}"
+ upload_raw_file "${NEWFILENAME}" "${PLUGIN_NAME}/${PLUGIN_VERSION}"
+ upload_raw_file "${WAGONFILE_NAME}" "${PLUGIN_NAME}/${PLUGIN_VERSION}"
rm -r $WAGONFILE_NAME
if [ "$TYPEFILE_NAME" != "$NEWFILENAME" ]; then