diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2017-05-07 22:35:56 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-05-07 22:35:56 +0000 |
commit | 8df3997a92bffa2d29f3c559933a336b837cdb93 (patch) | |
tree | 5ee50876b35b6c5fd40607665f72468cfcee51fe /doc/ci | |
parent | 8a0cde81feb3c8f3af26eefa5cef7b72eda2d266 (diff) | |
download | gitlab-ce-8df3997a92bffa2d29f3c559933a336b837cdb93.tar.gz |
Add Pipeline Schedules that supersedes experimental Trigger Schedule
Diffstat (limited to 'doc/ci')
-rw-r--r-- | doc/ci/img/pipeline_schedules_list.png | bin | 0 -> 67555 bytes | |||
-rw-r--r-- | doc/ci/img/pipeline_schedules_new_form.png | bin | 0 -> 49873 bytes | |||
-rw-r--r-- | doc/ci/pipeline_schedules.md | 40 | ||||
-rw-r--r-- | doc/ci/triggers/README.md | 38 | ||||
-rw-r--r-- | doc/ci/triggers/img/trigger_schedule_create.png | bin | 34264 -> 0 bytes | |||
-rw-r--r-- | doc/ci/triggers/img/trigger_schedule_edit.png | bin | 18524 -> 0 bytes | |||
-rw-r--r-- | doc/ci/triggers/img/trigger_schedule_updated_next_run_at.png | bin | 21896 -> 0 bytes |
7 files changed, 40 insertions, 38 deletions
diff --git a/doc/ci/img/pipeline_schedules_list.png b/doc/ci/img/pipeline_schedules_list.png Binary files differnew file mode 100644 index 00000000000..9388fac98eb --- /dev/null +++ b/doc/ci/img/pipeline_schedules_list.png diff --git a/doc/ci/img/pipeline_schedules_new_form.png b/doc/ci/img/pipeline_schedules_new_form.png Binary files differnew file mode 100644 index 00000000000..ea5394fa8a6 --- /dev/null +++ b/doc/ci/img/pipeline_schedules_new_form.png diff --git a/doc/ci/pipeline_schedules.md b/doc/ci/pipeline_schedules.md new file mode 100644 index 00000000000..0a9b0e7173f --- /dev/null +++ b/doc/ci/pipeline_schedules.md @@ -0,0 +1,40 @@ +# Pipeline Schedules + +> **Note**: +- This feature was introduced in 9.1 as [Trigger Schedule][ce-105533] +- In 9.2, the feature was [renamed to Pipeline Schedule][ce-10853] + +Pipeline schedules can be used to run pipelines only once, or for example every +month on the 22nd for a certain branch. + +## Using Pipeline Schedules + +In order to schedule pipelines, navigate to your their pages **Pipelines ➔ Schedules** +and click the **New Schedule** button. + +![New Schedule Form](img/pipeline_schedules_new_form.png) + +After entering the form, hit **Save Schedule** for the changes to have effect. +You can check a next execution date of the scheduled trigger, which is automatically calculated by a server. + +## Taking ownership + +![Schedules list](img/pipeline_schedules_list.png) + +Pipelines are executed as a user, which owns a schedule. This influences what +projects and other resources the pipeline has access to. If a user does not own +a pipeline, you can take ownership by clicking the **Take ownership** button. +The next time a pipeline is scheduled, your credentials will be used. + +> **Notes**: +- Those pipelines won't be executed precicely. Because schedules are handled by +Sidekiq, which runs according to its interval. For exmaple, if you set a schedule to +create a pipeline every minute (`* * * * *`) and the Sidekiq worker performs 00:00 +and 12:00 o'clock every day (`0 */12 * * *`), only 2 pipelines will be created per day. +To change the Sidekiq worker's frequency, you have to edit the `trigger_schedule_worker_cron` +value in your `gitlab.rb` 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). + +[ce-10533]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10533 +[ce-10853]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10853 diff --git a/doc/ci/triggers/README.md b/doc/ci/triggers/README.md index 5f611314d09..1251313cd14 100644 --- a/doc/ci/triggers/README.md +++ b/doc/ci/triggers/README.md @@ -216,42 +216,4 @@ You can add the following webhook to another project in order to trigger a job: https://gitlab.example.com/api/v4/projects/9/ref/master/trigger/pipeline?token=TOKEN&variables[UPLOAD_TO_S3]=true ``` -### Using cron to trigger nightly jobs - -Whether you craft a script or just run cURL directly, you can trigger jobs -in conjunction with cron. The example below triggers a job on the `master` -branch of project with ID `9` every night at `00:30`: - -```bash -30 0 * * * curl --request POST --form token=TOKEN --form ref=master https://gitlab.example.com/api/v4/projects/9/trigger/pipeline -``` - [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 differdeleted file mode 100644 index 3cfdc00b7a7..00000000000 --- a/doc/ci/triggers/img/trigger_schedule_create.png +++ /dev/null diff --git a/doc/ci/triggers/img/trigger_schedule_edit.png b/doc/ci/triggers/img/trigger_schedule_edit.png Binary files differdeleted file mode 100644 index 647eac0a5d0..00000000000 --- a/doc/ci/triggers/img/trigger_schedule_edit.png +++ /dev/null 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 differdeleted file mode 100644 index 71d08d04c37..00000000000 --- a/doc/ci/triggers/img/trigger_schedule_updated_next_run_at.png +++ /dev/null |