Skip to content

Commit

Permalink
check for stable configs as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirianni committed Jan 24, 2024
1 parent 1937189 commit 44e27bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,13 @@ main() {
awk '{print $2}' < configuration.out | while IFS= read -r config
do
status=$(bindplane rollout status "${config}" -o json | jq .status)
# TODO(jsirianni): Use switch case and check for all status codes, before
# merging this PR. Just need to look up the mapping.
if [ "$status" = 0 ]; then
echo "Configuration ${config} has a pending rollout, triggering rollout."
bindplane rollout start "$config"
elif [ "$status" = 4 ]; then
echo "Configuration ${config} is stable, skipping rollout."
fi
done
fi
Expand Down

0 comments on commit 44e27bb

Please sign in to comment.