`test: first job: script must be a string or array of strings

I would like to create a simple “hello world” Gitlab CI script. I already have a Docker runner and am experimenting with something like this:

image: debian:sid test:first: script: - true 

Unfortunately, the assembly failed: test:first job: script should be a string or an array of a strings

What am I doing wrong?

+6
source share
2 answers

After a little experiment, I found the root cause, and reported it as an error . Apparently, the "truth" was evaluated here as logical. Adding the path to the executable true helped solve the problem.

+3
source

Double-check your spacing in the lines of the list - in particular, a space follows each label. This can be easily forgotten, especially if the “list” is just one element.

(Although, admittedly, this was not the cause of the error in the CI file "Hello world")

0
source

All Articles