CI YAML syntax for external jobs

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

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 and needs:optional, but no other needs values.
  • only/except
  • rules
  • stage
  • timeout
  • when (only with a value of on_success, on_failure, or always).

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 🤖 GitLab Bot 🤖