Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
d5e94360
Commit
d5e94360
authored
Dec 21, 2015
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document triggers in yaml/README.md [ci skip]
parent
33ef13c6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+27
-0
No files found.
doc/ci/yaml/README.md
View file @
d5e94360
...
...
@@ -66,6 +66,7 @@ There are a few reserved `keywords` that **cannot** be used as job names:
| before_script | no | Define commands that run before each job's script |
| variables | no | Define build variables |
| cache | no | Define list of files that should be cached between subsequent runs |
| trigger | no | Force a rebuild of a specific branch or tag with an API call |
### image and services
...
...
@@ -152,6 +153,32 @@ cache:
-
binaries/
```
### trigger
Triggers can be used to force a rebuild of a specific branch or tag with an API
call. You can add a trigger by visiting the project's
**Settings > Triggers**
.
Every new trigger you create, gets assigned a different token which you can
then use inside your
`.gitlab-ci.yml`
:
```
yaml
trigger
:
stage
:
deploy
script
:
-
"
curl
-X
POST
-F
token=TOKEN
-F
ref=master
https://gitlab.com/api/v3/projects/9/trigger/builds"
```
In the example above, a rebuild on master branch will be triggered after all
previous stages build successfully (denoted by
`stage: deploy`
).
You can find the endpoint containing the ID of the project on the
**Triggers**
page.
_
**Warning:**
Be careful how you set up your triggers, because you could end up
in an infinite loop._
Read more in the dedicated
[
triggers documentation
](
../triggers/README.md
)
.
## Jobs
`.gitlab-ci.yml`
allows you to specify an unlimited number of jobs. Each job
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment