blob: 23c5fbd9da345045dcd1a4afb2b9d141cdc64700 [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')
23 echo "Release automation not implemented yet."
24 exit 1
25 ;;
26 *)
27 echo "You must set BUILD_TYPE to one of (snapshot, staging, release)."
28 exit 1
29 ;;
30 esac
31done
32cd ../../../