How can I capture logs from a GitLab CI runner's service?

I’m trying to troubleshoot some intermittent CI failures. My gitlab-ci.yml uses an ElasticSearch service which sometimes fails. I want to capture its logs and persist them alongside my other build artifacts.

I’ve read through https://docs.gitlab.com/ee/ci/docker/using_docker_images.html but I don’t see any mention of this.

Any pointers?

1 Like

Hi,

looks like this isn’t directly possible, but the issue has a workaround listed: https://gitlab.com/gitlab-org/gitlab-runner/issues/2119

Cheers,
Michael

2 Likes