diff options
author | Dosuken shinya <gitlab.shinyamaeda@gmail.com> | 2017-04-21 14:18:30 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2017-04-21 14:18:30 +0300 |
commit | dcc89f12384cfc0095cbf51840c7d2c2fc859fdf (patch) | |
tree | 08f8d0098f7a38e28f003beb573b863402d807d7 /doc/ci/triggers | |
parent | d79e587e7efd108a9c5afc3c722b38bc685e9098 (diff) |
Add doc for scheduled trigger
Diffstat (limited to 'doc/ci/triggers')
-rw-r--r-- | doc/ci/triggers/README.md | 28 | ||||
-rw-r--r-- | doc/ci/triggers/img/trigger_schedule_create.png | bin | 0 -> 34264 bytes | |||
-rw-r--r-- | doc/ci/triggers/img/trigger_schedule_edit.png | bin | 0 -> 18524 bytes | |||
-rw-r--r-- | doc/ci/triggers/img/trigger_schedule_updated_next_run_at.png | bin | 0 -> 21896 bytes |
4 files changed, 28 insertions, 0 deletions
diff --git a/doc/ci/triggers/README.md b/doc/ci/triggers/README.md index e380282f910..5f611314d09 100644 --- a/doc/ci/triggers/README.md +++ b/doc/ci/triggers/README.md @@ -227,3 +227,31 @@ branch of project with ID `9` every night at `00:30`: ``` [ci-229]: https://gitlab.com/gitlab-org/gitlab-ci/merge_requests/229 + +## Using scheduled triggers + +> [Introduced][ci-10533] in GitLab CE 9.1 as experimental. + +In order to schedule a trigger, navigate to your project's **Settings ➔ CI/CD Pipelines ➔ Triggers** and edit an existing trigger token. + +![Triggers Schedule edit](img/trigger_schedule_edit.png) + +To set up a scheduled trigger: + +1. Check the **Schedule trigger (experimental)** checkbox +1. Enter a cron value for the frequency of the trigger ([learn more about cron notation](http://www.nncron.ru/help/EN/working/cron-format.htm)) +1. Enter the timezone of the cron trigger ([see a list of timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)) +1. Enter the branch or tag that the trigger will target +1. Hit **Save trigger** for the changes to take effect + +![Triggers Schedule create](img/trigger_schedule_create.png) + +You can check a next execution date of the scheduled trigger, which is automatically calculated by a server. + +![Triggers Schedule create](img/trigger_schedule_updated_next_run_at.png) + +> **Notes**: +- Those triggers won't be executed precicely. Because scheduled triggers are handled by Sidekiq, which runs according to its interval. For exmaple, if you set a trigger to be executed every minute (`* * * * *`) and the Sidekiq worker performs 00:00 and 12:00 o'clock every day (`0 */12 * * *`), then your trigger will be executed only 00:00 and 12:00 o'clock every day. To change the Sidekiq worker's frequency, you have to edit the `trigger_schedule_worker` value in `config/gitlab.yml` and restart GitLab. The Sidekiq worker's configuration on GiLab.com is able to be looked up at [here](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example#L185). +- Cron notation is parsed by [Rufus-Scheduler](https://github.com/jmettraux/rufus-scheduler). + +[ci-10533]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10533 diff --git a/doc/ci/triggers/img/trigger_schedule_create.png b/doc/ci/triggers/img/trigger_schedule_create.png Binary files differnew file mode 100644 index 00000000000..3cfdc00b7a7 --- /dev/null +++ b/doc/ci/triggers/img/trigger_schedule_create.png diff --git a/doc/ci/triggers/img/trigger_schedule_edit.png b/doc/ci/triggers/img/trigger_schedule_edit.png Binary files differnew file mode 100644 index 00000000000..647eac0a5d0 --- /dev/null +++ b/doc/ci/triggers/img/trigger_schedule_edit.png diff --git a/doc/ci/triggers/img/trigger_schedule_updated_next_run_at.png b/doc/ci/triggers/img/trigger_schedule_updated_next_run_at.png Binary files differnew file mode 100644 index 00000000000..71d08d04c37 --- /dev/null +++ b/doc/ci/triggers/img/trigger_schedule_updated_next_run_at.png |