CI YAML syntax for external jobs
Proposal
Introduce new CI YAML syntax to allow setting jobs as external
. Possible values are true
or false
(false
is the default, but there's no reason to specify this).
If a job is configured as external, this information should be stored somewhere easily accessible, as it will be used to determine if a job should be picked up by a runner or wait for external input (that is, if it enters the pending
or waiting_for_callback
status when triggered).
Example job definition:
wait-for-sync:
stage: sync
external: true
Similar to trigger jobs, external jobs can only use a subset of the available configuration options. Only the following should be allowed for external jobs:
allow_failure
environment
extends
interruptible
-
needs
andneeds:optional
, but no otherneeds
values. -
only
/except
rules
stage
timeout
-
when
(only with a value ofon_success
,on_failure
, oralways
).
Definition of done
-
.gitlab-ci.yml
supports external job syntax. -
Rules are in place to only allow the correct configuration options for external jobs (eg. no script
). -
When a job is configured as external
, this information is stored to allow efficient fetching later.
Edited by Tiger Watson