firecow / gitlab-ci-local

Tired of pushing to test your .gitlab-ci.yml?
MIT License
2.24k stars 127 forks source link

Add option to NOT remove container after job finishes (failed or not) #1084

Closed XobSod closed 7 months ago

XobSod commented 7 months ago

Is your feature request related to a problem? Please describe. My current use-case: I have (most probably) problem with moving artifacts between stages (not all files are selected in filters). So job1 is producing artifacts and finishes with success, and job2 is taking those artifacts and fails. Now to debug it I have to add sleeps to both stages to be able to log in into containers and poke around...

Describe the solution you'd like It would be nice to have a possibility to tell gitlab-ci-local to not destroy given jobs container. Then after the pipeline finishes it would still be possible to connect to failed (or not) containers and check what is going on. (Or maybe there is already such possibility, but I can't find it?)

Describe alternatives you've considered adding sleeps and other random commands to the script to try to find what is going on.

Additional context none

firecow commented 7 months ago

Isn't --no-cleanup what you are looking for?

XobSod commented 7 months ago

Yup... thank you. I must have somehow missed the information one can negate a flag with --no-.

BTW is there any more detailed documentation of how gitlab-ci-local flags work? In my case the help is not very verbose, and I can't find anything more

firecow commented 7 months ago

The only documentation available is the README.md file, and the example folder.

Doc improvement PR's are very much appreciated 👍