blob: cf3936eea4910a6bb297d81b246bcd5772c16f17 [file] [log] [blame]
lj141214da5542017-02-15 03:25:16 +00001#!/bin/bash
2# Create a debian package and push to remote repo
3#
4echo "============== STARTING SCRIPT TO CREATE DEBIAN FILES ================="
5
6export BUILD_NUMBER="${BUILD_ID}"
7export PATH=$PATH:${WORKSPACE}/buildtools/bin
8
Andrew Grimberg52435d52017-02-16 05:36:59 -08009export NEXUS_RAW="${NEXUSPROXY}/content/sites/raw"
10USER=$(xpath -q -e \
lj141214da5542017-02-15 03:25:16 +000011 "//servers/server[id='ecomp-raw']/username/text()" "$SETTINGS_FILE")
Andrew Grimberg52435d52017-02-16 05:36:59 -080012PASS=$(xpath -q -e \
lj141214da5542017-02-15 03:25:16 +000013 "//servers/server[id='ecomp-raw']/password/text()" "$SETTINGS_FILE")
14
Andrew Grimberg52435d52017-02-16 05:36:59 -080015# Create a netrc file for use with curl
16export NETRC=$(mktemp)
17echo "machine nexus.openecomp.org login ${USER} password ${PASS}" > "${NETRC}"
18
19echo $NEXUS_RAW
lj141214da5542017-02-15 03:25:16 +000020
21export REPACKAGEDEBIANUPLOAD="set -x; curl -k \
Andrew Grimberg52435d52017-02-16 05:36:59 -080022 --netrc-file '${NETRC}' \
lj141214da5542017-02-15 03:25:16 +000023 --upload-file '{0}' \
Andrew Grimberg52435d52017-02-16 05:36:59 -080024 '${NEXUS_RAW}/org.openecomp.dcae/deb-snapshots/{2}/{1}'"
lj141214da5542017-02-15 03:25:16 +000025export REPACKAGEDEBIANUPLOAD2="set -x; curl -k \
Andrew Grimberg52435d52017-02-16 05:36:59 -080026 --netrc-file '${NETRC}' \
lj141214da5542017-02-15 03:25:16 +000027 --upload-file '{0}' \
Andrew Grimberg52435d52017-02-16 05:36:59 -080028 '${NEXUS_RAW}/org.openecomp.dcae/deb-snapshots/{2}/{4}-LATEST.deb'"
lj141214da5542017-02-15 03:25:16 +000029make debian
30echo "================= ENDING SCRIPT TO CREATE DEBIAN FILES ================="
31
32#echo "============= STARTING SCRIPT TO CREATE JAVADOCS FILES ================"
33#make upload-javadocs
34#echo "============= ENDING SCRIPT TO CREATE JAVADOCS FILES =================="