Skip to content

Commit

Permalink
Merge pull request #186 from jack-w-shaw/fix_conditional_install
Browse files Browse the repository at this point in the history
Fix conditional installs
  • Loading branch information
jack-w-shaw authored Jun 28, 2024
2 parents ff336a9 + 5b04edb commit 6def64b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions jobs/ci-run/integration/common/test-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ sudo apt-get -y update
# set, so retries succeed.
attempts=0
while [ $attempts -lt 3 ]; do
if [ ! "$(which jq >/dev/null 2>&1)" ]; then
if ! which jq >/dev/null 2>&1; then
sudo snap install jq || true
fi
if [ ! "$(which yq >/dev/null 2>&1)" ]; then
if ! which yq >/dev/null 2>&1; then
sudo snap install yq || true
fi
if [ ! "$(which shellcheck >/dev/null 2>&1)" ]; then
if ! which shellcheck >/dev/null 2>&1; then
sudo snap install shellcheck || true
fi
if [ ! "$(which expect >/dev/null 2>&1)" ]; then
if ! which expect >/dev/null 2>&1; then
sudo apt-get -y install expect || true
fi
if [ ! "$(which petname >/dev/null 2>&1)" ]; then
if ! which petname >/dev/null 2>&1; then
sudo snap install petname || true
fi
if [ ! "$(which microceph >/dev/null 2>&1)" ]; then
sudo snap install microceph || true
fi
# shellcheck disable=SC2193
if [ "${{BOOTSTRAP_PROVIDER:-}}" = "ec2" ]; then
if [ ! "$(which aws >/dev/null 2>&1)" ]; then
if ! which aws >/dev/null 2>&1; then
sudo snap install aws-cli --classic || true
fi

Expand All @@ -74,7 +74,7 @@ while [ $attempts -lt 3 ]; do
fi
# shellcheck disable=SC2193
if [ "${{BOOTSTRAP_PROVIDER:-}}" = "azure" ]; then
if [ ! "$(which az >/dev/null 2>&1)" ]; then
if ! which az >/dev/null 2>&1; then
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
fi

Expand Down

0 comments on commit 6def64b

Please sign in to comment.