Skip to content

Commit

Permalink
scripts: Check bootstrap config archives in iso-manager
Browse files Browse the repository at this point in the history
Check that all configured archives are valid path
pointing to valid MetalK8s archives, to fail early.

Refs: #3079
  • Loading branch information
alexandre-allard committed Feb 11, 2021
1 parent e16262c commit 155f3c7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/iso-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,18 @@ _configure_archives() {
--retcode-passthrough
}

_check_config() {
# This call will fail if there is any invalid archive
# configured in the bootstrap configuration file.
$SALT_CALL metalk8s.get_archives
}

# Main

_set_env
[ -z "$SALTENV" ] && die "saltenv not set"

run "Check bootstrap configuration file" _check_config
if (( ${#ARCHIVES[@]} )); then
run "Add archives" _add_archives "${ARCHIVES[@]}"
fi
Expand Down

0 comments on commit 155f3c7

Please sign in to comment.