Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -e -o pipefail |
efiacor | 0d19d3b | 2022-12-01 14:52:39 +0000 | [diff] [blame^] | 4 | echo "*** starting chart publish process for $BUILD_TYPE" |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 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) |
Sylvain Desbureaux | f5eb026 | 2021-06-21 08:12:34 +0200 | [diff] [blame] | 13 | echo " ** processing chart $chart" |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 14 | case "$BUILD_TYPE" in |
| 15 | 'snapshot') |
Sylvain Desbureaux | f5eb026 | 2021-06-21 08:12:34 +0200 | [diff] [blame] | 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/" |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 18 | ;; |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 19 | 'release') |
Sylvain Desbureaux | f5eb026 | 2021-06-21 08:12:34 +0200 | [diff] [blame] | 20 | echo " * release build, pushing to https://nexus3.onap.org/repository/onap-helm-release/" |
Bengt Thuree | 220aef8 | 2022-04-26 00:30:38 +1000 | [diff] [blame] | 21 | curl -vn --upload-file "$chart" "https://nexus3.onap.org/repository/onap-helm-release/" |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 22 | ;; |
| 23 | *) |
efiacor | 0d19d3b | 2022-12-01 14:52:39 +0000 | [diff] [blame^] | 24 | echo "You must set BUILD_TYPE to one of (snapshot, release)." |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 25 | exit 1 |
| 26 | ;; |
| 27 | esac |
| 28 | done |
efiacor | 0d19d3b | 2022-12-01 14:52:39 +0000 | [diff] [blame^] | 29 | echo "*** chart publish process finished" |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 30 | cd ../../../ |