Sort executors list on runner's registration prompt.
Description
I think it would be nice to consider sorting executor list on prompt during the registration of runner, hence we always get different sort for the same list. Ex:
Run1: Please enter the executor: docker, docker-ssh, virtualbox, docker-ssh+machine, parallels, shell, ssh, docker+machine, kubernetes:
Run2: Please enter the executor: parallels, shell, kubernetes, docker, docker-ssh, docker+machine, docker-ssh+machine, ssh, virtualbox:
Run3: Please enter the executor: shell, ssh, docker-ssh+machine, docker, parallels, virtualbox, docker+machine, kubernetes, docker-ssh:
This way we could expect same prompt on each run, which would be easier to answer the prompt automatically.
Proposal
I'm not familiar with GoLang, so sorry if I made a mistake about sorting method.
gitlab-ci-multi-runner/commands/register.go, line 86:
from:
> s.Executor = s.ask("executor", "Please enter the executor: "+executors+":", true)
to:
> s.Executor = s.ask("executor", "Please enter the executor: "+sort.Strings(executors)+":", true)
Links to related issues and merge requests / references
Please paste a link of the related issues or/and merge requests