Skip to content

How to Simulate Test CI When It Fails Only On GitlabΒΆ

This will create extraneous containers on your machine, namely app, redis and postgres

  1. clone repo git clone git@gitlab.fftrader.cz:fftrader/commerce-service-team/commerce-service.git commerce-ci-test
  2. cd commerce-ci-test
  3. checkout offending branch/commit git checkout <whatever>
  4. check version of docker-in-docker or dind in .base-dind in build.gitlab-ci.yml.
  5. stop all running docker containers
  6. run docker run -it --rm -v .:/repo -v /var/run/docker.sock:/var/run/docker.sock --workdir /repo docker:27-dind /bin/sh with correct dind version
  7. run apk add bash && chmod +x ./.gitlab/ci/scripts/run-tests.sh
  8. run ./.gitlab/ci/scripts/run-tests.sh
  9. debug filesystem/artifacts

After you are done

  1. docker ps to check containers status
  2. docker container remove --force app redis postgres