Locally - everything works for me, but something is constantly wrong in CI.
I have tried several ci configurations:
test:
stage: test
tags:
- dind
variables:
# Instruct Testcontainers to use the daemon of DinD, use port 2375 for non-tls connections.
DOCKER_HOST: "tcp://docker:2375"
# Instruct Docker not to start over TLS.
DOCKER_TLS_CERTDIR: ""
# Improve performance with overlayfs.
DOCKER_DRIVER: overlay2
image: ******/artifacts/build-tools/scala-sbt-docker-image:latest
services:
- name: docker:dind
# explicitly disable tls to avoid docker startup interruption
command: ["--tls=false"]
cache:
paths:
- target/
script:
- sbt clean coverage test coverageReport
- mkdir -p public
- mkdir -p public/coverage
- cp -rv target/${SCALA}/scoverage-report public/coverage
artifacts:
expire_in: 1 days
name: coveragereport
paths:
- public/coverage
and this(with second runner):
test:
stage: test
tags:
- test
image: ******/artifacts/build-tools/scala-sbt-docker-image:latest
cache:
paths:
- target/
script:
- sbt clean coverage test coverageReport
- mkdir -p public
- mkdir -p public/coverage
- cp -rv target/${SCALA}/scoverage-report public/coverage
artifacts:
expire_in: 1 days
name: coveragereport
paths:
- public/coverage
The most common mistakes:
1) the application cannot connect to the service from compose by port
2) can't wait for the service to start (waits for the port to be listened to)
I've made a lot of attempts..
I have two runners:
1.
And I have a test that runs compose:
Locally - everything works for me, but something is constantly wrong in CI. I have tried several ci configurations:
and this(with second runner):
The most common mistakes: 1) the application cannot connect to the service from compose by port 2) can't wait for the service to start (waits for the port to be listened to)