gitlab-ci-local icon indicating copy to clipboard operation
gitlab-ci-local copied to clipboard

--no-cleanup option

Open moberghammer opened this issue 3 years ago • 5 comments

Add a --exec option to debug a docker executor job.

eg. gitlab-ci-local some-job --exec bash would run the docker command with -it and --exec

moberghammer avatar Jun 28 '21 07:06 moberghammer

@moberghammer Are we talking about an interactive debug mode, where you are able to run commands from within the "job" container?

firecow avatar Jul 08 '21 20:07 firecow

Yes to debug interaction with services, artifacts and other ressources

moberghammer avatar Jul 09 '21 04:07 moberghammer

Another kind of wish that came up to my mind regarding debugging services.

Maybe some switch like --no-rm to skip the removal of (some, eg service) containers so after the pipeline has been run, it would be possible to examine what kind of logs were output by the service containers with docker logs <container-id>. Now the cleanupResources will remove containers in every situation after running. Or maybe I could somehow use that @Interactive decorator to achieve this?

Anyways, not sure if that is good or bad idea. And there might be already a way to debug the service containers, that I just did not realize yet? Do you think this could be another feature issue if this sounds feasible? Thanks again!

Snurppa avatar Sep 15 '21 06:09 Snurppa

--no-cleanup

Would be a great option...

firecow avatar Sep 15 '21 06:09 firecow

We should just always put container logs in .gitlab-ci-local/container_logs/

firecow avatar Apr 21 '22 07:04 firecow