Skip to content

Tag schedules and switch jobs on or off according to tag

Description

Currently you can have multiple schedules, but each one must run the whole pipeline. From 9.3 you can switch on and off jobs according to whether or not the pipeline was called by a schedule, but still not per schedule. This cuts out a big use case of having multiple schedules.

Proposal

Give each schedule a 'tag' and extend the only/except filters to allow references to schedule tags.

Links / references

The following issue is related, but I don't think it's possible to switch on or off jobs according to the value of a variable.

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

Documentation blurb

Use cases

If you have an intrinsically non-deterministic testing system (which typically becomes harder to avoid, the higher level or the more applications integrated into your tests), you might want periodic re-runs of the same test over a period of development in order to gather statistics about reliability. You might do this as part of a drive to make your tests more deterministic and ultimately completely deterministic.

Meanwhile this requirement can be satisfied by periodic re-scheduling of your pipeline (if one job runs one instance of such a test). From 9.3, this is fine if you only have one test: you can use only/except to select which jobs your pipeline should run. If you have several tests, it is hard to make different schedules run different jobs in your pipeline.

Feature checklist

Make sure these are completed before closing the issue, with a link to the relevant commit.