How to Simulate Test CI When It Fails Only On GitlabΒΆ
This will create extraneous containers on your machine, namely
app,redisandpostgres
- clone repo
git clone git@gitlab.fftrader.cz:fftrader/commerce-service-team/commerce-service.git commerce-ci-test cd commerce-ci-test- checkout offending branch/commit
git checkout <whatever> - check version of
docker-in-dockerordindin.base-dindin build.gitlab-ci.yml. - stop all running docker containers
- run
docker run -it --rm -v .:/repo -v /var/run/docker.sock:/var/run/docker.sock --workdir /repo docker:27-dind /bin/shwith correctdindversion - run
apk add bash && chmod +x ./.gitlab/ci/scripts/run-tests.sh - run
./.gitlab/ci/scripts/run-tests.sh - debug filesystem/artifacts
After you are done
docker psto check containers statusdocker container remove --force app redis postgres