Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Airgap] Fix script to support Dev and Staging #853

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/elemental-airgap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,21 @@ fetch_charts() {
for c in $charts; do
local chart=""
local chart_ver=""
local opts=""

# helm pull only supports semver tags: for the "latest" tag just don't put the version.
[[ "$CHART_VERSION" != "latest" ]] && chart_ver="--version $CHART_VERSION"

# helm pull needs to be aware of development versions
[[ "${CHART_NAME_OPERATOR}" =~ (Dev|dev|DEV|Staging|staging|STAGING) ]] && opts="--devel"

# 'c' var holds the name (e.g., CHART_NAME_OPERATOR),
# 'chart' var holds the value (e.g., elemental-operator-chart-1.4.tgz)
eval chart=\$$c
case $chart in
"oci://"*|"https//"*)
log_debug "fetching chart '$chart' $chart_ver"
if ! outstr=$(helm pull ${chart} $chart_ver 2>&1); then
if ! outstr=$(helm pull ${opts} ${chart} $chart_ver 2>&1); then
exit_error "downloading ${chart}:\n $outstr"
fi
eval $c=$(ls -t1 | head -n 1)
Expand Down
Loading