blob: 9c511c5b69671704a04e69962044fad4a8224c2b [file] [log] [blame]
Jeremy Phelps3cffa432018-08-15 16:26:12 -05001#!/bin/bash
2
3set -e -o pipefail
4cd kubernetes/dist/packages/ || exit
5helm_charts=()
6while IFS= read -a line; do
7 helm_charts+=( "$line" )
8done < <( ls )
9
10for chart in "${helm_charts[@]}"; do
11 chart=$(echo "$chart" | xargs)
12 case "$BUILD_TYPE" in
13 'snapshot')
Jeremy Phelps954af3c2018-11-28 16:13:25 -060014 echo "-n --upload-file $chart https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$chart"
15 curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$chart"
16 curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE//$GERRIT_BRANCH/$GIT_COMMIT/$chart"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050017 ;;
18 'staging')
Jeremy Phelps954af3c2018-11-28 16:13:25 -060019 curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$chart"
20 curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$GIT_COMMIT/$chart"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050021 ;;
22 'release')
Sylvain Desbureauxed8ead92020-12-02 15:59:28 +010023 curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$chart"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050024 ;;
25 *)
26 echo "You must set BUILD_TYPE to one of (snapshot, staging, release)."
27 exit 1
28 ;;
29 esac
30done
31cd ../../../