Skip to content

Commit

Permalink
Bump terraform dependency with arm64 support (elastic#24214)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Feb 24, 2021
1 parent c3a4974 commit b1b3faf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
25 changes: 23 additions & 2 deletions .ci/scripts/install-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,35 @@

set -exuo pipefail

MSG="parameter missing."
MSG="environment variable missing: DOCKER_COMPOSE_VERSION."
DOCKER_COMPOSE_VERSION=${DOCKER_COMPOSE_VERSION:?$MSG}
HOME=${HOME:?$MSG}

ARCH=$(uname -m| tr '[:upper:]' '[:lower:]')
if [ "${ARCH}" == "aarch64" ] ; then
echo "docker-compose distribution for ARM is not supported yet. See https://github.com/docker/compose/issues/6831."
echo "Let's use the installed docker-compose version"
exit 0
fi

if command -v docker-compose
then
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
fi

echo "UNMET DEP: Installing docker-compose"

DC_CMD="${HOME}/bin/docker-compose"

mkdir -p "${HOME}/bin"

if curl -sSLo "${DC_CMD}" "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" ; then
if curl -sSLo "${DC_CMD}" "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)"; then
chmod +x "${DC_CMD}"
else
echo "Something bad with the download, let's delete the corrupted binary"
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pipeline {
RUNBLD_DISABLE_NOTIFICATIONS = 'true'
SLACK_CHANNEL = "#beats-build"
SNAPSHOT = 'true'
TERRAFORM_VERSION = "0.12.24"
TERRAFORM_VERSION = "0.12.30"
XPACK_MODULE_PATTERN = '^x-pack\\/[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*'
}
options {
Expand Down

0 comments on commit b1b3faf

Please sign in to comment.