Skip to content

"command should be an array of strings" when using !reference

I'm currently trying to do the following:

shared.yml

.dind-registry-mirror:
  command:
    - "--registry-mirror"
    - "https://mirror.gcr.io"

Actual workflow:

include:
  - /shared.yml

...
  services:
    - name: docker:dind
      command: 
        - !reference [.dind-registry-mirror, command]
        - "--tls=false"

However the pipeline crashes with a command should be an array of strings error.

The !reference works when it's used inside script, cache and so on, so I don't quite understand why it fails here...

This might be related to: #322992 (closed)

Edited by 🤖 GitLab Bot 🤖