Triggers define what causes a jenkins job to start buliding.
| Macro: | trigger |
|---|---|
| Entry Point: | jenkins_jobs.triggers |
Example:
job:
name: test_job
triggers:
- timed: '@daily'
Trigger on a Gerrit event. Requires the Jenkins Gerrit Trigger Plugin.
| Parameters: |
|
|---|
You may select one or more gerrit events upon which to trigger. You must also supply at least one project and branch, optionally more. If you select the comment-added trigger, you should alse indicate which approval category and value you want to trigger the job.
Example:
triggers:
- gerrit:
triggerOnCommentAddedEvent: true
triggerApprovalCategory: 'APRV'
triggerApprovalValue: 1
projects:
- projectCompareType: 'PLAIN'
projectPattern: 'test-project'
branchCompareType: 'ANT'
branchPattern: '**'
Poll the SCM to determine if there has been a change.
| Parameter : | the polling interval (cron syntax) |
|---|
Example:
triggers:
- pollscm: "\*/15 * * * \*"
Trigger builds at certain times.
| Parameter : | when to run the job (cron syntax) |
|---|
Example:
triggers:
- timed: "@midnight"