Merge "Compress large error attachments"
[releng/builder.git] / jjb / deploy-distribution.sh
1 #!/bin/bash
2 set -xeu -o pipefail
3
4 echo "Uploading distribution to Nexus..."
5 "$MVN" deploy:deploy-file \
6     --log-file deploy-karaf-distribution.log \
7     --global-settings "$GLOBAL_SETTINGS_FILE" \
8     --settings "$SETTINGS_FILE" \
9     -Dfile="$BUNDLE_URL" \
10     -DrepositoryId=opendaylight-snapshot \
11     -Durl="$ODLNEXUSPROXY/content/repositories/opendaylight.snapshot/" \
12     -DgroupId="org.opendaylight.integration.${GERRIT_PROJECT//\//.}" \
13     -DartifactId=distribution-karaf \
14     -Dversion="$BUNDLE_VERSION" \
15     -Dpackaging=zip
16
17 BUNDLE_URL=$(grep "Uploaded.*distribution-karaf/$BUNDLE_VERSION.*.zip" deploy-karaf-distribution.log | awk '{print $3}')
18 echo "Bundle uploaded to $BUNDLE_URL"
19
20 # Re-inject the new BUNDLE_URL for downstream jobs to pull from Nexus
21 env | grep BUNDLE_ | sort | tee deploy-distribution.env