Skip to content

Commit

Permalink
Updated flux bootstrap to work with kairos-agent 2.8.15
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnajar authored and jimmykarily committed Aug 26, 2024
1 parent 77dcd1f commit c3a4017
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions flux/flux-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ if flux version &>/dev/null; then
fi

# Determine what VCS we need to bootstrap
# Starting in kairos 2.8.15, kairos-agent command returns empty string instead of "null"
for vcs in bitbucket_server git github gitlab; do
# kairos-agent used to return `null` when a key wasn't set, now returns empty.
# we handle both
if [[ $(kairos-agent config get flux.$vcs 2>/dev/null) != "" ]] && [[ $(kairos-agent config get flux.$vcs 2>/dev/null) != "null" ]]; then
value=$(kairos-agent config get flux.$vcs 2>/dev/null)
if [[ $value != "null" && -n $value ]]; then
version_control=$vcs
break
fi
Expand Down Expand Up @@ -119,4 +121,4 @@ else
fi

error "Failed to bootstrap with Flux, timed out ($minutes minutes)"
exit 4
exit 4

0 comments on commit c3a4017

Please sign in to comment.