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

Add info how to add a new trigger on a new project

parent 169254f7
No related branches found
No related tags found
1 merge request!48Add info how to add a new trigger on a new project
Loading
Loading
@@ -57,6 +57,28 @@ We use [GitLab Pages][pages] to build and host this website. You can see
A [job] is used to trigger a new build whenever tests run and pass on master
branch of CE.
 
To add a new trigger for another project:
1. Go to https://gitlab.com/gitlab-com/doc-gitlab-com/triggers (you need Master
access) and copy the trigger value.
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`:
```yaml
# Trigger docs build
# https://gitlab.com/gitlab-com/doc-gitlab-com/blob/master/README.md#deployment-process
trigger_docs:
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"
only:
- master
```
[contributing]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#merge-request-guidelines
[doc-styleguide]: https://docs.gitlab.com/ce/development/doc_styleguide.html
[job]: https://gitlab.com/gitlab-org/gitlab-ce/blob/2c00d00ec1c39dbea0e0e54265027b5476b78e3c/.gitlab-ci.yml#L308-318
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