blob: 4cc27fe2db622186dd087750270ae6436a3de972 [file] [log] [blame]
Jeremy Phelps3cffa432018-08-15 16:26:12 -05001#!/bin/bash
2
3set -e -o pipefail
Sylvain Desbureauxf5eb0262021-06-21 08:12:34 +02004echo "*** starting releace process for $BUILD_TYPE"
Jeremy Phelps3cffa432018-08-15 16:26:12 -05005cd kubernetes/dist/packages/ || exit
6helm_charts=()
7while IFS= read -a line; do
8 helm_charts+=( "$line" )
9done < <( ls )
10
11for chart in "${helm_charts[@]}"; do
12 chart=$(echo "$chart" | xargs)
Sylvain Desbureauxf5eb0262021-06-21 08:12:34 +020013 echo " ** processing chart $chart"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050014 case "$BUILD_TYPE" in
15 'snapshot')
Sylvain Desbureauxf5eb0262021-06-21 08:12:34 +020016 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/"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050018 ;;
19 'staging')
Sylvain Desbureauxf5eb0262021-06-21 08:12:34 +020020 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/"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050022 ;;
23 'release')
Sylvain Desbureauxf5eb0262021-06-21 08:12:34 +020024 echo " * release build, pushing to https://nexus3.onap.org/repository/onap-helm-release/"
Bengt Thuree220aef82022-04-26 00:30:38 +100025 curl -vn --upload-file "$chart" "https://nexus3.onap.org/repository/onap-helm-release/"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050026 ;;
27 *)
28 echo "You must set BUILD_TYPE to one of (snapshot, staging, release)."
29 exit 1
30 ;;
31 esac
32done
Sylvain Desbureauxf5eb0262021-06-21 08:12:34 +020033echo "*** release process finished"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050034cd ../../../