blob: 46017432874cf8c0c16f76412176b2f573266c6f [file] [log] [blame]
Jeremy Phelps3cffa432018-08-15 16:26:12 -05001#!/bin/bash
2
3set -e -o pipefail
efiacor0d19d3b2022-12-01 14:52:39 +00004echo "*** starting chart publish 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 ;;
Jeremy Phelps3cffa432018-08-15 16:26:12 -050019 'release')
Sylvain Desbureauxf5eb0262021-06-21 08:12:34 +020020 echo " * release build, pushing to https://nexus3.onap.org/repository/onap-helm-release/"
Bengt Thuree220aef82022-04-26 00:30:38 +100021 curl -vn --upload-file "$chart" "https://nexus3.onap.org/repository/onap-helm-release/"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050022 ;;
23 *)
efiacor0d19d3b2022-12-01 14:52:39 +000024 echo "You must set BUILD_TYPE to one of (snapshot, release)."
Jeremy Phelps3cffa432018-08-15 16:26:12 -050025 exit 1
26 ;;
27 esac
28done
efiacor0d19d3b2022-12-01 14:52:39 +000029echo "*** chart publish process finished"
Jeremy Phelps3cffa432018-08-15 16:26:12 -050030cd ../../../