From 0d60c76af863ba2a38b28b16854ae572de9c6c96 Mon Sep 17 00:00:00 2001 From: lakkeger Date: Fri, 17 May 2024 13:49:11 +0200 Subject: [PATCH] fix(ci:gitlab): fix name resolution issue --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e72834c..bbd9714 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,8 +31,9 @@ default: - mkdir -p $PIP_CACHE_DIR - python3 -m pip install localstack awscli awscli-local - docker pull localstack/localstack-pro:latest - - dind_ip="$(getent hosts docker | cut -d' ' -f1)" - - echo "${dind_ip} localhost.localstack.cloud " >> /etc/hosts + # Gitlab has changed to ipv6, but LocalStack not supporting it + - dind_ip="$(getent ahostsv4 docker | cut -d' ' -f1 | head -n1)" + - echo -e "${dind_ip}\tlocalhost.localstack.cloud\n" >> /etc/hosts - localstack start -d - localstack wait -t 30 - (test -f ./ls-state-pod.zip && localstack state import ./ls-state-pod.zip) || true @@ -57,7 +58,6 @@ deploy: script: - ./bin/deploy.sh - localstack state export ./ls-state-pod.zip - - localstack logs test: stage: test @@ -69,6 +69,8 @@ test: - .circleci/* - .github/* - when: always + needs: + - deploy before_script: - *default_before_scripts - python3 -m pip install -r requirements-dev.txt