blob: 9c511c5b69671704a04e69962044fad4a8224c2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/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/$GERRIT_BRANCH/$chart"
curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$chart"
curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE//$GERRIT_BRANCH/$GIT_COMMIT/$chart"
;;
'staging')
curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$chart"
curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$GERRIT_BRANCH/$GIT_COMMIT/$chart"
;;
'release')
curl -n --upload-file "$chart" "https://nexus.onap.org/content/sites/oom-helm-$BUILD_TYPE/$chart"
;;
*)
echo "You must set BUILD_TYPE to one of (snapshot, staging, release)."
exit 1
;;
esac
done
cd ../../../
|