generate crds from tag
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
This commit is contained in:
parent
c4f63af0a6
commit
92a22acef5
1 changed files with 0 additions and 33 deletions
|
@ -1,33 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
if [[ $(uname -s) = "Darwin" ]]; then
|
||||
VERSION="$(grep ^appVersion "${SCRIPT_DIR}/../Chart.yaml" | sed 's/appVersion: //g')"
|
||||
else
|
||||
VERSION="$(grep ^appVersion "${SCRIPT_DIR}/../Chart.yaml" | sed 's/appVersion:\s//g')"
|
||||
fi
|
||||
|
||||
FILES=(
|
||||
"analysis-run-crd.yaml : analysis-run-crd.yaml"
|
||||
"analysis-template-crd.yaml : analysis-template-crd.yaml"
|
||||
"cluster-analysis-template-crd.yaml : cluster-analysis-template-crd.yaml"
|
||||
"experiment-crd.yaml : experiment-crd.yaml"
|
||||
"rollout-crd.yaml : rollout-crd.yaml"
|
||||
)
|
||||
|
||||
for line in "${FILES[@]}"; do
|
||||
DESTINATION=$(echo "${line%%:*}" | xargs)
|
||||
SOURCE=$(echo "${line##*:}" | xargs)
|
||||
|
||||
URL="https://raw.githubusercontent.com/argoproj/argo-rollouts/$VERSION/manifests/crds/$SOURCE"
|
||||
|
||||
echo -e "Downloading Prometheus Operator CRD with Version ${VERSION}:\n${URL}\n"
|
||||
|
||||
echo "# ${URL}" > "${SCRIPT_DIR}/../templates/crds/${DESTINATION}"
|
||||
|
||||
if ! curl --silent --retry-all-errors --fail --location "${URL}" >> "${SCRIPT_DIR}/../templates/crds/${DESTINATION}"; then
|
||||
echo -e "Failed to download ${URL}!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
Loading…
Reference in a new issue