Skip to content

WIP: Add scheduled job support in gitlab-ci.yml

Alessio Caiazza requested to merge 1660-scheduled-jobs into master

What does this MR do?

This MR introduces a new syntax for job.when in gitlab-ci.yml.

Now it will be possible to postpone a job using something like this

my job:
  script: "echo 'ok'"
  when: in 1 hr

Here we are introducing a new state, :scheduled, in HasStatus

A new Ci::Build with this new syntax will transition from :created to :scheduled, after that transition a Ci::EnqueueBuildWorker will be scheduled according to the time expressed in job.when.

A scheduled job behaves like a manual job before it enters the :running state (i.e. it can be run manually or canceled)

What are the relevant issue numbers?

See gitlab-org/gitlab-ee#1660

Does this MR meet the acceptance criteria?

Edited by Alessio Caiazza

Merge request reports