Make entrypoint and command keys to be array of strings
Following the discussion at https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/596#note_33707778 this MR is changing a little the syntax of recently added .gitlab-ci.yml
options.
The initial work was done in !8578 (merged). It added new syntax to the .gitlab-ci.yml
:
image:
name: image-name
entrypoint: /some/command
services:
- name: image-name
alias: service-alias
entrypoint: /some/command
command: echo "command name"
However, Docker expects that entrypoint
and command
options will be passed as arrays of strings. @ayufan noticed here - https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/596#note_31755835 - that splitting provided string with " "
is not a good idea since it doesn't handle the string in the way that shell is doing this. After thinking about this I decided to resolve the problem with the syntax present in Dockerfile - make the entrypoint
and command
a string arrays. We could of course prepare a proper parser on the Runner's side, but this approach creates the MVP and at the same moment it introduces a syntax that Docker users are already aware of. With changes from this MR the above example would look like
image:
name: image-name
entrypoint: ["/some/command"]
services:
- name: image-name
alias: service-alias
entrypoint: ["/some/command"]
command: ["echo", "command name"]
@ayufan @grzesiek Could you look on this?
This MR introduces changes that should be included in the documentation MR - !12164 (merged).
This MR is not updating CHANGELOG - it's an update to !8578 (merged) which will be released in the same version and which contains the CHANGELOG entry.