lj1412 | 14da554 | 2017-02-15 03:25:16 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Create a debian package and push to remote repo |
| 3 | # |
| 4 | echo "============== STARTING SCRIPT TO CREATE DEBIAN FILES =================" |
| 5 | |
| 6 | export BUILD_NUMBER="${BUILD_ID}" |
| 7 | export PATH=$PATH:${WORKSPACE}/buildtools/bin |
| 8 | |
Andrew Grimberg | 52435d5 | 2017-02-16 05:36:59 -0800 | [diff] [blame^] | 9 | export NEXUS_RAW="${NEXUSPROXY}/content/sites/raw" |
| 10 | USER=$(xpath -q -e \ |
lj1412 | 14da554 | 2017-02-15 03:25:16 +0000 | [diff] [blame] | 11 | "//servers/server[id='ecomp-raw']/username/text()" "$SETTINGS_FILE") |
Andrew Grimberg | 52435d5 | 2017-02-16 05:36:59 -0800 | [diff] [blame^] | 12 | PASS=$(xpath -q -e \ |
lj1412 | 14da554 | 2017-02-15 03:25:16 +0000 | [diff] [blame] | 13 | "//servers/server[id='ecomp-raw']/password/text()" "$SETTINGS_FILE") |
| 14 | |
Andrew Grimberg | 52435d5 | 2017-02-16 05:36:59 -0800 | [diff] [blame^] | 15 | # Create a netrc file for use with curl |
| 16 | export NETRC=$(mktemp) |
| 17 | echo "machine nexus.openecomp.org login ${USER} password ${PASS}" > "${NETRC}" |
| 18 | |
| 19 | echo $NEXUS_RAW |
lj1412 | 14da554 | 2017-02-15 03:25:16 +0000 | [diff] [blame] | 20 | |
| 21 | export REPACKAGEDEBIANUPLOAD="set -x; curl -k \ |
Andrew Grimberg | 52435d5 | 2017-02-16 05:36:59 -0800 | [diff] [blame^] | 22 | --netrc-file '${NETRC}' \ |
lj1412 | 14da554 | 2017-02-15 03:25:16 +0000 | [diff] [blame] | 23 | --upload-file '{0}' \ |
Andrew Grimberg | 52435d5 | 2017-02-16 05:36:59 -0800 | [diff] [blame^] | 24 | '${NEXUS_RAW}/org.openecomp.dcae/deb-snapshots/{2}/{1}'" |
lj1412 | 14da554 | 2017-02-15 03:25:16 +0000 | [diff] [blame] | 25 | export REPACKAGEDEBIANUPLOAD2="set -x; curl -k \ |
Andrew Grimberg | 52435d5 | 2017-02-16 05:36:59 -0800 | [diff] [blame^] | 26 | --netrc-file '${NETRC}' \ |
lj1412 | 14da554 | 2017-02-15 03:25:16 +0000 | [diff] [blame] | 27 | --upload-file '{0}' \ |
Andrew Grimberg | 52435d5 | 2017-02-16 05:36:59 -0800 | [diff] [blame^] | 28 | '${NEXUS_RAW}/org.openecomp.dcae/deb-snapshots/{2}/{4}-LATEST.deb'" |
lj1412 | 14da554 | 2017-02-15 03:25:16 +0000 | [diff] [blame] | 29 | make debian |
| 30 | echo "================= 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 ==================" |