Skip to content
Snippets Groups Projects
Commit 9906869f authored by Achilleas Pipinellis's avatar Achilleas Pipinellis
Browse files

Add info about adding the project variable when triggering

parent f590be51
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -66,17 +66,21 @@ To add a new trigger for another project:
1. Go to the project you will be triggering from and add a secret variable
named `DOCS_TRIGGER_TOKEN` with the value of the trigger you copied from the
previous step.
1. Add the following job to the project's `.gitlab-ci.yml`:
1. Add the following job to the project's `.gitlab-ci.yml`, where you should
replace the `PROJECT` variable's value with the name of the project the
trigger is running from, for example `ce`, `ee`, `omnibus`, `runner`, etc.:
 
```yaml
# Trigger docs build
# https://gitlab.com/gitlab-com/doc-gitlab-com/blob/master/README.md#deployment-process
trigger_docs:
variables:
GIT_STRATEGY: none
before_script: []
cache: {}
artifacts: {}
script:
- "curl -X POST -F token=${DOCS_TRIGGER_TOKEN} -F ref=master https://gitlab.com/api/v3/projects/38069/trigger/builds"
- "curl -X POST -F token=${DOCS_TRIGGER_TOKEN} -F ref=master -F variables[PROJECT]=ce https://gitlab.com/api/v3/projects/38069/trigger/builds"
only:
- master
```
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment