diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2017-05-18 10:55:29 +0000 |
---|---|---|
committer | Sean Packham (GitLab) <sean@seanpackham.com> | 2017-05-18 10:55:29 +0000 |
commit | ae96126e9f341b4d4464ee5512184960fab345f6 (patch) | |
tree | 7fda8f32cb6e47e0d31871f048683ad2852aeb24 /doc/ci | |
parent | d08f6bdcb735ddb2428fb2b1960175fa3f126d15 (diff) | |
download | gitlab-ce-ae96126e9f341b4d4464ee5512184960fab345f6.tar.gz |
Refactor pipeline schedules docs
Diffstat (limited to 'doc/ci')
-rw-r--r-- | doc/ci/README.md | 3 | ||||
-rw-r--r-- | doc/ci/img/pipeline_schedules_list.png | bin | 67555 -> 0 bytes | |||
-rw-r--r-- | doc/ci/img/pipeline_schedules_new_form.png | bin | 49873 -> 0 bytes | |||
-rw-r--r-- | doc/ci/pipeline_schedules.md | 44 | ||||
-rw-r--r-- | doc/ci/triggers/README.md | 20 |
5 files changed, 19 insertions, 48 deletions
diff --git a/doc/ci/README.md b/doc/ci/README.md index 86de0ee9043..4f17e7062ab 100644 --- a/doc/ci/README.md +++ b/doc/ci/README.md @@ -66,7 +66,8 @@ learn how to leverage its potential even more. submodules are involved - [Auto deploy](autodeploy/index.md) - [Use SSH keys in your build environment](ssh_keys/README.md) -- [Trigger jobs through the GitLab API](triggers/README.md) +- [Trigger pipelines through the GitLab API](triggers/README.md) +- [Trigger pipelines on a schedule](../user/project/pipelines/schedules.md) ## Review Apps diff --git a/doc/ci/img/pipeline_schedules_list.png b/doc/ci/img/pipeline_schedules_list.png Binary files differdeleted file mode 100644 index 9388fac98eb..00000000000 --- a/doc/ci/img/pipeline_schedules_list.png +++ /dev/null diff --git a/doc/ci/img/pipeline_schedules_new_form.png b/doc/ci/img/pipeline_schedules_new_form.png Binary files differdeleted file mode 100644 index ea5394fa8a6..00000000000 --- a/doc/ci/img/pipeline_schedules_new_form.png +++ /dev/null diff --git a/doc/ci/pipeline_schedules.md b/doc/ci/pipeline_schedules.md deleted file mode 100644 index 73451da6c0c..00000000000 --- a/doc/ci/pipeline_schedules.md +++ /dev/null @@ -1,44 +0,0 @@ -# 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. - - - -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 - - - -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). -- When the owner of the schedule does not have the ability to create pipelines -anymore, due to e.g. being blocked or removed from the project, the schedule is -deactivated. Another user can take ownership and activate it, so the schedule is -run again. - -[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 1251313cd14..27cdaa9978b 100644 --- a/doc/ci/triggers/README.md +++ b/doc/ci/triggers/README.md @@ -1,6 +1,6 @@ -# Triggering jobs through the API +# Triggering pipelines through the API -> **Note**: +> **Notes**: - [Introduced][ci-229] in GitLab CE 7.14. - GitLab 8.12 has a completely redesigned job permissions system. Read all about the [new model and its implications](../../user/project/new_ci_build_permissions_model.md#job-triggers). @@ -208,7 +208,7 @@ curl --request POST \ https://gitlab.example.com/api/v4/projects/9/trigger/pipeline ``` -### Using webhook to trigger job +### Using a webhook to trigger a pipeline You can add the following webhook to another project in order to trigger a job: @@ -216,4 +216,18 @@ 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 pipelines + +>**Note:** +The following behavior can also be achieved through GitLab's UI with +[pipeline schedules](../../user/project/pipelines/schedules.md). + +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 |