diff options
Diffstat (limited to 'shell/publish_helm_charts.sh')
-rwxr-xr-x | shell/publish_helm_charts.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/shell/publish_helm_charts.sh b/shell/publish_helm_charts.sh new file mode 100755 index 000000000..02a0c74ae --- /dev/null +++ b/shell/publish_helm_charts.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -e -o pipefail +cd kubernetes/dist/packages/ || exit +helm_charts=() +while IFS= read -a line; do + helm_charts+=( "$line" ) +done < <( ls ) + +for chart in "${helm_charts[@]}"; do + chart=$(echo "$chart" | xargs) + case "$BUILD_TYPE" in + 'snapshot') + echo "-n --upload-file $chart https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$chart" + curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$chart" + curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GIT_COMMIT/$chart" + ;; + 'staging') + curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$chart" + curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GIT_COMMIT/$chart" + ;; + 'release') + echo "Release automation not implemented yet." + exit 1 + ;; + *) + echo "You must set BUILD_TYPE to one of (snapshot, staging, release)." + exit 1 + ;; + esac +done +cd ../../../ |