0

About a year ago we set up a gitlab-pipeline to integration-test a bunch of interacting containers. The whole test is steered from a pytest based script which starts/stops individual containers and feeds them with data.

Now we need to move this whole integration test into a docker container to ensure isolation from different pipelines. For this we planned to use gitlabs docker in docker workflow.

However, with this workflow the gitlab-runner now spawns a separate container for the pytest engine as well as a container which then holds all spawned sub-containers. This leads to the problem that the steering script container is unable to connect to the testie containers inside the service container.

enter image description here

How can I add this connection?

The relevant part of the .yaml is this:

integration_test:
  stage: integration_test
  image: <image path>dind-py3-cml
  services:
    - docker:dind
  variables:
    FF_NETWORK_PER_BUILD: 1
  script:
    - pytest --capture=sys ./unittests/integration_test/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.