Chore: Add debug flag to curl cmd for helm release
[ci-management.git] / shell / publish_helm_charts.sh
1 #!/bin/bash
2
3 set -e -o pipefail
4 echo "*** starting releace process for $BUILD_TYPE"
5 cd kubernetes/dist/packages/ || exit
6 helm_charts=()
7 while IFS= read -a line; do
8     helm_charts+=( "$line" )
9 done < <( ls )
10
11 for chart in "${helm_charts[@]}"; do
12   chart=$(echo "$chart" | xargs)
13   echo " ** processing chart $chart"
14   case "$BUILD_TYPE" in
15     'snapshot')
16       echo "  * snapshot build, pushing to https://nexus3.onap.org/repository/onap-helm-testing/"
17       curl -vn --upload-file "$chart" "https://nexus3.onap.org/repository/onap-helm-testing/"
18       ;;
19     'staging')
20       echo "  * staging build, pushing to https://nexus3.onap.org/repository/onap-helm-testing/"
21       curl -vn --upload-file "$chart" "https://nexus3.onap.org/repository/onap-helm-testing/"
22       ;;
23     'release')
24       echo "  * release build, pushing to https://nexus3.onap.org/repository/onap-helm-release/"
25       curl -vn --upload-file "$chart" "https://nexus3.onap.org/repository/onap-helm-release/"
26         ;;
27     *)
28       echo "You must set BUILD_TYPE to one of (snapshot, staging, release)."
29       exit 1
30       ;;
31   esac
32 done
33 echo "*** release process finished"
34 cd ../../../