blob: 51c802f6012cbd40c5b3e3083981020f1cb51237 [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
lj1412f75ed992017-02-17 22:21:06 +000021
22REPO="${NEXUS_RAW}/org.openecomp.dcae.devnull/"
23
24export REPACKAGEDEBIANUPLOAD="set -x; curl -k --netrc-file '${NETRC}' \
25 --upload-file '{0}' '${REPO}/{2}/{1}'"
26export REPACKAGEDEBIANUPLOAD2="set -x; curl -k --netrc-file '${NETRC}' \
27 --upload-file '{0}' '${REPO}/{2}/{4}-LATEST.deb'"
lj141214da5542017-02-15 03:25:16 +000028make debian
29echo "================= ENDING SCRIPT TO CREATE DEBIAN FILES ================="
30
31#echo "============= STARTING SCRIPT TO CREATE JAVADOCS FILES ================"
32#make upload-javadocs
33#echo "============= ENDING SCRIPT TO CREATE JAVADOCS FILES =================="