As an enhancement to the previous sample with a single time trigger, this pipeline example implements two time resource triggers and the ability to manually kick it off outside of the time resources schedules.
This is a typical pattern for system backup pipelines, where administrators require the automated backup to run for a couple or few times a day and also the ability to have a one-off run when necessary.
Download the sample pipeline configuration file here.
The sample uses a third timer resource labelled as manualtrigger
to control the manual triggering of all steps of the pipeline in the appropriate sequence.
To create the sample pipeline in your concourse server:
-
download file scheduled-pipeline-02.yml
-
issue the following fly command:
fly -t <your-concourse-alias> set-pipeline -p multiple-timers -c scheduled-pipeline-02.yml
Then unpaused the multiple-timers
pipeline in Concourse and it will be triggered either automatically in the interval of every 4 or every 10 minutes or manually by running job manual-trigger
.
Note:
- The
manualtrigger
resource is necessary in order to propagate the manual execution to all steps in this pipeline. Without it, if one tries to run the first individual job of the pipeline, no other job would be executed due to the lack of a common manual trigger.