blob: 02a0c74ae8ce4ee18f4483fa2d8be57f0178693c [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')
14 echo "-n --upload-file $chart https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$chart"
15 curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$chart"
16 curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GIT_COMMIT/$chart"
17 ;;
18 'staging')
19 curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$chart"
20 curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GIT_COMMIT/$chart"
21 ;;
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 ../../../