diff options
author | lj1412 <lji@research.att.com> | 2017-02-22 15:32:55 +0000 |
---|---|---|
committer | lj1412 <lji@research.att.com> | 2017-02-22 15:32:55 +0000 |
commit | 62907cbd1fca59634716a92cffa90488b9f2ce28 (patch) | |
tree | 0e9e76eae8e211fffc7096b7ecc756fb5659d8bc | |
parent | 7927ff179242b796330d17869c83fa07751abf95 (diff) |
deb build script
Change-Id: I562aad2a31e08acc8521c299e6c540be519030fd
Signed-off-by: lj1412 <lji@research.att.com>
-rwxr-xr-x | script-pgaas-deb-build.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/script-pgaas-deb-build.sh b/script-pgaas-deb-build.sh new file mode 100755 index 0000000..3869117 --- /dev/null +++ b/script-pgaas-deb-build.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Create a debian package and push to remote repo + +if [ "$#" != "1" ]; then + phase="verify" +else + phase="$1" + case $phase in + verify|merge|release) + echo "Running $phase job" + ;; + *) + echo "Unknown phase $phase" + exit 1 + esac +fi + + +# +echo "============== STARTING SCRIPT TO CREATE DEBIAN FILES =================" + +export BUILD_NUMBER="${BUILD_ID}" +export PATH="$PATH:${WORKSPACE}/buildtools/bin" +export NEXUS_RAW="${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") + +# Create a netrc file for use with curl +export NETRC=$(mktemp) +echo "machine nexus.openecomp.org login ${USER} password ${PASS}" > "${NETRC}" + +if [ "$phase" == "verify" ]; then + REPO="${NEXUS_RAW}/org.openecomp.dcae.pgaas/deb-snapshots" +else + REPO="${NEXUS_RAW}/org.openecomp.dcae.devnull/deb-snapshots" +fi +export REPACKAGEDEBIANUPLOAD="set -x; curl -k --netrc-file '${NETRC}' \ + --upload-file '{0}' '${REPO}/{2}/{1}'" +export REPACKAGEDEBIANUPLOAD2="set -x; curl -k --netrc-file '${NETRC}' \ + --upload-file '{0}' '${REPO}/{2}/{4}-LATEST.deb'" +make debian + +echo "================= ENDING SCRIPT TO CREATE DEBIAN FILES =================" + +#echo "============= STARTING SCRIPT TO CREATE JAVADOCS FILES ================" +#make upload-javadocs +#echo "============= ENDING SCRIPT TO CREATE JAVADOCS FILES ==================" |