summaryrefslogtreecommitdiff
path: root/doc/ci/triggers/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/triggers/README.md')
-rw-r--r--doc/ci/triggers/README.md35
1 files changed, 8 insertions, 27 deletions
diff --git a/doc/ci/triggers/README.md b/doc/ci/triggers/README.md
index 47f11a6228c..2b006b8779b 100644
--- a/doc/ci/triggers/README.md
+++ b/doc/ci/triggers/README.md
@@ -7,12 +7,6 @@ type: tutorial
# Triggering pipelines through the API
-> **Notes**:
->
-> - [Introduced](https://about.gitlab.com/releases/2015/08/22/gitlab-7-14-released/) in GitLab 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#pipeline-triggers).
-
Triggers can be used to force a pipeline rerun of a specific `ref` (branch or
tag) with an API call.
@@ -97,7 +91,7 @@ This allows you to use that for multi-project pipelines and download artifacts
from any project to which you have access as this follows the same principles
with the [permission model](../../user/permissions.md#job-permissions).
-Read more about the [jobs API](../../api/jobs.md#download-the-artifacts-archive).
+Read more about the [jobs API](../../api/job_artifacts.md#download-the-artifacts-archive).
## Adding a new trigger
@@ -120,11 +114,6 @@ The action is irreversible.
## Triggering a pipeline
-> **Notes**:
->
-> - Valid refs are only the branches and tags. If you pass a commit SHA as a ref,
-> it will not trigger a job.
-
To trigger a job you need to send a `POST` request to GitLab's API endpoint:
```plaintext
@@ -132,8 +121,8 @@ POST /projects/:id/trigger/pipeline
```
The required parameters are the [trigger's `token`](#authentication-tokens)
-and the Git `ref` on which the trigger will be performed. Valid refs are the
-branch and the tag. The `:id` of a project can be found by
+and the Git `ref` on which the trigger will be performed. Valid refs are
+branches or tags. The `:id` of a project can be found by
[querying the API](../../api/projects.md) or by visiting the **CI/CD**
settings page which provides self-explanatory examples.
@@ -142,16 +131,12 @@ UI under the **Jobs** page and the jobs are marked as triggered 'by API'.
![Marked rebuilds as on jobs page](img/builds_page.png)
----
-
You can see which trigger caused the rebuild by visiting the single job page.
A part of the trigger's token is exposed in the UI as you can see from the image
below.
![Marked rebuilds as triggered on a single job page](img/trigger_single_build.png)
----
-
By using cURL you can trigger a pipeline rerun with minimal effort, for example:
```shell
@@ -191,14 +176,6 @@ This means that whenever a new tag is pushed on project A, the job will run and
## Triggering a pipeline from a webhook
-> **Notes**:
->
-> - Introduced in GitLab 8.14.
-> - `ref` should be passed as part of the URL in order to take precedence over
-> `ref` from the webhook body that designates the branch ref that fired the
-> trigger in the source repository.
-> - `ref` should be URL-encoded if it contains slashes.
-
To trigger a job from a webhook of another project you need to add the following
webhook URL for Push and Tag events (change the project ID, ref and token):
@@ -206,6 +183,10 @@ webhook URL for Push and Tag events (change the project ID, ref and token):
https://gitlab.example.com/api/v4/projects/9/ref/master/trigger/pipeline?token=TOKEN
```
+`ref` should be passed as part of the URL in order to take precedence over
+`ref` from the webhook body that designates the branch ref that fired the
+trigger in the source repository. `ref` should be URL-encoded if it contains slashes.
+
## Making use of trigger variables
You can pass any number of arbitrary variables in the trigger API call and they
@@ -271,7 +252,7 @@ of all types of variables.
## Using cron to trigger nightly pipelines
->**Note:**
+NOTE: **Note:**
The following behavior can also be achieved through GitLab's UI with
[pipeline schedules](../pipelines/schedules.md).