diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2017-05-17 16:14:01 +0200 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2017-05-17 16:14:01 +0200 |
commit | 00c6c42722ba1b3d6ecc9a1ebdc1b6fb827736b7 (patch) | |
tree | bcf7fb08f7679466a127f979a0ddc6b7904101c1 | |
parent | 6ee8b1e7b5c3762d937d5e0d5b98295d0915a1a6 (diff) | |
download | gitlab-ce-docs/refactor-pipeline-schedules.tar.gz |
Bring back section on nightly triggers and mention schedulesdocs/refactor-pipeline-schedules
-rw-r--r-- | doc/ci/triggers/README.md | 20 |
1 files changed, 17 insertions, 3 deletions
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 |