summaryrefslogtreecommitdiffstats
path: root/shell/helm/publish_helm_charts.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shell/helm/publish_helm_charts.sh')
-rwxr-xr-xshell/helm/publish_helm_charts.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/shell/helm/publish_helm_charts.sh b/shell/helm/publish_helm_charts.sh
new file mode 100755
index 000000000..460174328
--- /dev/null
+++ b/shell/helm/publish_helm_charts.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+set -e -o pipefail
+echo "*** starting chart publish process for $BUILD_TYPE"
+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)
+ echo " ** processing chart $chart"
+ case "$BUILD_TYPE" in
+ 'snapshot')
+ echo " * snapshot build, pushing to https://nexus3.onap.org/repository/onap-helm-testing/"
+ curl -vn --upload-file "$chart" "https://nexus3.onap.org/repository/onap-helm-testing/"
+ ;;
+ 'release')
+ echo " * release build, pushing to https://nexus3.onap.org/repository/onap-helm-release/"
+ curl -vn --upload-file "$chart" "https://nexus3.onap.org/repository/onap-helm-release/"
+ ;;
+ *)
+ echo "You must set BUILD_TYPE to one of (snapshot, release)."
+ exit 1
+ ;;
+ esac
+done
+echo "*** chart publish process finished"
+cd ../../../