Do not require script entry for job, require commands instead

Description

CI job can be defined as follows:

rspec:
  stage: test

This is clearly invalid, but

before_script:
 - rspec $DIRECTORY

test:unit:
  variables:
     DIRECTORY: spec/unit/

test:feature
  variables:
     DIRECTORY: spec/feature

looks like a good configuration.

Proposal

We do have Ci::Config::Entry::Job#commands method, that returns all the commands that runner has to execute. I think we should validate presence of commands, instead of requiring presence of script.

What do you think @ayufan @connorshea?

Links / references

https://gitlab.com/gitlab-org/gitlab-ce/issues/24759

Edited Jul 27, 2020 by Jason Yavorsky
Assignee Loading
Time tracking Loading