firecow / gitlab-ci-local

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

Added --default-image option to be used with --shell-executor-no-image=false #1397

Closed NGPetrov closed 1 week ago

NGPetrov commented 4 weeks ago

Currently if --shell-executor-no-image=false is used the runner defaults to docker.io/ruby:3.1. In case isolation is required, there is no option to run the ci in a custom image.

Added --default-image option. If set when --shell-executor-no-image=false, the value will be used as a image source for the container. If not set when --shell-executor-no-image=false, the default docker.io/ruby:3.1 will be used. If set when --shell-executor-no-image=true (or not set), warring message is displayed. If set when --shell-isolation, warring message is displayed.

~Fixed typo (or old option name) in arvg.ts:49, from --no-shell-executor-no-image to --shell-executor-no-image~

Included 3 tests to validate proper runner image/shell is used.

NGPetrov commented 2 weeks ago

All fixes are implemented. With a force push to keep the history clean.