summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJeremy Phelps <jphelps@linuxfoundation.org>2018-08-15 16:26:12 -0500
committerJessica Wagantall <jwagantall@linuxfoundation.org>2018-08-23 16:05:45 +0000
commit3cffa43d73a08aa10cc5c074e3fe1072fb7d9178 (patch)
treedab84cde0f5c004ff7dd32b5976fb12d07fd5fc1 /shell
parent3d649565fde368e72dfbf5adcf78c4e5c25efbd2 (diff)
Add helm-chart publishing script
Issue-ID: CIMAN-164 Change-Id: Iae6f765c2f8a7953a308f2ce81e79e4f633a1a2e Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
Diffstat (limited to 'shell')
-rwxr-xr-xshell/publish_helm_charts.sh32
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 ../../../