Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -e -o pipefail |
| 4 | cd kubernetes/dist/packages/ || exit |
| 5 | helm_charts=() |
| 6 | while IFS= read -a line; do |
| 7 | helm_charts+=( "$line" ) |
| 8 | done < <( ls ) |
| 9 | |
| 10 | for chart in "${helm_charts[@]}"; do |
| 11 | chart=$(echo "$chart" | xargs) |
| 12 | case "$BUILD_TYPE" in |
| 13 | 'snapshot') |
Jeremy Phelps | 954af3c | 2018-11-28 16:13:25 -0600 | [diff] [blame] | 14 | echo "-n --upload-file $chart https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$chart" |
| 15 | curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$chart" |
| 16 | curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE//$GERRIT_BRANCH/$GIT_COMMIT/$chart" |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 17 | ;; |
| 18 | 'staging') |
Jeremy Phelps | 954af3c | 2018-11-28 16:13:25 -0600 | [diff] [blame] | 19 | curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$chart" |
| 20 | curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$GIT_COMMIT/$chart" |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 21 | ;; |
| 22 | 'release') |
Sylvain Desbureaux | ed8ead9 | 2020-12-02 15:59:28 +0100 | [diff] [blame] | 23 | curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$chart" |
Jeremy Phelps | 3cffa43 | 2018-08-15 16:26:12 -0500 | [diff] [blame] | 24 | ;; |
| 25 | *) |
| 26 | echo "You must set BUILD_TYPE to one of (snapshot, staging, release)." |
| 27 | exit 1 |
| 28 | ;; |
| 29 | esac |
| 30 | done |
| 31 | cd ../../../ |