Skip to content

Commit 377134a

Browse files
authored
Fix name resolution issue in GitLab (#31)
1 parent 332ca8c commit 377134a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.gitlab-ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ default:
3131
- mkdir -p $PIP_CACHE_DIR
3232
- python3 -m pip install localstack awscli awscli-local
3333
- docker pull localstack/localstack-pro:latest
34-
- dind_ip="$(getent hosts docker | cut -d' ' -f1)"
35-
- echo "${dind_ip} localhost.localstack.cloud " >> /etc/hosts
34+
# Gitlab has changed to ipv6, but LocalStack not supporting it
35+
- dind_ip="$(getent ahostsv4 docker | cut -d' ' -f1 | head -n1)"
36+
- echo -e "${dind_ip}\tlocalhost.localstack.cloud\n" >> /etc/hosts
3637
- localstack start -d
3738
- localstack wait -t 30
3839
- (test -f ./ls-state-pod.zip && localstack state import ./ls-state-pod.zip) || true
@@ -57,7 +58,6 @@ deploy:
5758
script:
5859
- ./bin/deploy.sh
5960
- localstack state export ./ls-state-pod.zip
60-
- localstack logs
6161

6262
test:
6363
stage: test
@@ -69,6 +69,8 @@ test:
6969
- .circleci/*
7070
- .github/*
7171
- when: always
72+
needs:
73+
- deploy
7274
before_script:
7375
- *default_before_scripts
7476
- python3 -m pip install -r requirements-dev.txt

0 commit comments

Comments
 (0)