Skip to content

Commit

Permalink
[CI]: if corrupted installation in workers then install tools (elasti…
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Mar 2, 2021
1 parent 1184c49 commit 9ddc25c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .ci/scripts/install-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ fi

if command -v docker-compose
then
set +e
echo "Found docker-compose. Checking version.."
FOUND_DOCKER_COMPOSE_VERSION=$(docker-compose --version|awk '{print $3}'|sed s/\,//)
if [ $FOUND_DOCKER_COMPOSE_VERSION == $DOCKER_COMPOSE_VERSION ]
then
echo "Versions match. No need to install docker-compose. Exiting."
exit 0
fi
set -e
fi

echo "UNMET DEP: Installing docker-compose"
Expand Down
2 changes: 2 additions & 0 deletions .ci/scripts/install-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ KIND_CMD="${HOME}/bin/kind"

if command -v kind
then
set +e
echo "Found Kind. Checking version.."
FOUND_KIND_VERSION=$(kind --version 2>&1 >/dev/null | awk '{print $3}')
if [ "$FOUND_KIND_VERSION" == "$KIND_VERSION" ]
then
echo "Versions match. No need to install Kind. Exiting."
exit 0
fi
set -e
fi

echo "UNMET DEP: Installing Kind"
Expand Down
2 changes: 2 additions & 0 deletions .ci/scripts/install-kubectl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ KUBECTL_CMD="${HOME}/bin/kubectl"

if command -v kubectl
then
set +e
echo "Found kubectl. Checking version.."
FOUND_KUBECTL_VERSION=$(kubectl version --client --short 2>&1 >/dev/null | awk '{print $3}')
if [ "${FOUND_KUBECTL_VERSION}" == "${K8S_VERSION}" ]
then
echo "Versions match. No need to install kubectl. Exiting."
exit 0
fi
set -e
fi

echo "UNMET DEP: Installing kubectl"
Expand Down
2 changes: 2 additions & 0 deletions .ci/scripts/install-terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ TERRAFORM_CMD="${HOME}/bin/terraform"

if command -v terraform
then
set +e
echo "Found Terraform. Checking version.."
FOUND_TERRAFORM_VERSION=$(terraform --version | awk '{print $2}' | sed s/v//)
if [ "$FOUND_TERRAFORM_VERSION" == "$TERRAFORM_VERSION" ]
then
echo "Versions match. No need to install Terraform. Exiting."
exit 0
fi
set -e
fi

echo "UNMET DEP: Installing Terraform"
Expand Down

0 comments on commit 9ddc25c

Please sign in to comment.