Skip to content

Support falling back to ruby version of checkers

Patrick Bajao requested to merge 181-migrate-gitlab-shell-checks-fallback into master

Rename the ruby scripts to have -ruby suffix and add a symlink for both to ./gitlab-shell. The executable name will be used to determine how args will be parsed.

For now, we only parse the arguments for gitlab-shell commands. If the executable is gitlab-shell-authorized-keys-check or gitlab-shell-authorized-principals-check, it'll always fallback to the ruby version.

Ruby specs test the ruby script, the fallback from go to ruby and go implementation of both (still pending).

This also includes adding support to different CommandArgs types. For now, we only have commandargs.Shell (we'll have commandargs.AuthorizedKeys and commandargs.AuthorizedPrincipals later on). This is needed as different executables (gitlab-shell, gitlab-shell-authorized-keys-check, gitlab-shell-authorized-principals-check) expect different formats of arguments.

#181 (closed)

Edited by Patrick Bajao

Merge request reports