Skip to content

Commit

Permalink
fix(ci:gitlab): fix name resolution issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lakkeger committed May 23, 2024
1 parent 332ca8c commit 0d60c76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -57,7 +58,6 @@ deploy:
script:
- ./bin/deploy.sh
- localstack state export ./ls-state-pod.zip
- localstack logs

test:
stage: test
Expand All @@ -69,6 +69,8 @@ test:
- .circleci/*
- .github/*
- when: always
needs:
- deploy
before_script:
- *default_before_scripts
- python3 -m pip install -r requirements-dev.txt
Expand Down

0 comments on commit 0d60c76

Please sign in to comment.