Add reference pipelines file for Gerrit driver

As it has been done for the Pagure driver, include
a reference pipelines section in the Gerrit driver
documentation. It helps the reader to better
understand the big picture of the Gerrit's pipelines
configuration but also provide an almost ready to use
pipelines definition file.

Change-Id: I5234476f7393ba938e8365b8c908a2ff6f9e8c76
This commit is contained in:
Fabien Boucher 2019-07-25 12:08:15 +02:00
parent 29bbbd69b4
commit 60ece31607
2 changed files with 140 additions and 0 deletions

View File

@ -333,3 +333,11 @@ order to be enqueued into the pipeline.
my-gerrit:
approval:
- Code-Review: [-1, -2]
Reference pipelines configuration
---------------------------------
Here is an example of standard pipelines you may want to define:
.. literalinclude:: ../examples/zuul-config/zuul.d/gerrit-reference-pipelines.yaml
:language: yaml

View File

@ -0,0 +1,132 @@
- pipeline:
name: check
description: |
Newly uploaded patchsets enter this pipeline to receive an
initial +/-1 Verified vote.
manager: independent
precedence: low
require:
gerrit:
open: True
current-patchset: True
trigger:
gerrit:
- event: patchset-created
- event: change-restored
- event: comment-added
comment: (?i)^(Patch Set [0-9]+:)?( [\w\\+-]*)*(\n\n)?\s*recheck
success:
gerrit:
# Note that gerrit keywords are case-sensitive.
Verified: 1
sqlreporter:
failure:
gerrit:
Verified: -1
sqlreporter:
- pipeline:
name: gate
description: |
Changes that have been approved by core reviewers are enqueued
in order in this pipeline, and if they pass tests, will be
merged. For documentation on how gating with Zuul works, please see
https://zuul-ci.org/docs/zuul/user/gating.html
manager: dependent
precedence: normal
supercedes: check
post-review: True
require:
gerrit:
open: True
current-patchset: True
approval:
- Workflow: 1
trigger:
gerrit:
- event: comment-added
approval:
- Workflow: 1
start:
gerrit:
Verified: 0
success:
gerrit:
Verified: 2
submit: true
sqlreporter:
failure:
gerrit:
Verified: -2
sqlreporter:
window-floor: 20
window-increase-factor: 2
- pipeline:
name: post
description: |
This pipeline runs jobs that operate after each change is
merged. Queue items are identified by the abbreviated hash (git
log --format=%h) of the merge commit.
manager: supercedent
precedence: high
post-review: True
trigger:
gerrit:
- event: ref-updated
ref: ^refs/heads/.*$
success:
sqlreporter:
failure:
sqlreporter:
- pipeline:
name: promote
description: |
This pipeline runs jobs that operate after each change is merged
in order to promote artifacts generated in the gate
pipeline.
manager: supercedent
precedence: high
post-review: True
trigger:
gerrit:
- event: change-merged
success:
gerrit: {}
sqlreporter:
failure:
gerrit: {}
sqlreporter:
- pipeline:
name: release
description: |
When a commit is tagged as a release, this pipeline runs jobs
that publish archives and documentation.
manager: independent
precedence: high
post-review: True
trigger:
gerrit:
- event: ref-updated
ref: ^refs/tags/[0-9]+(\.[0-9]+)*$
success:
sqlreporter:
failure:
sqlreporter:
- pipeline:
name: tag
post-review: true
description: This pipeline runs jobs in response to any tag event.
manager: independent
precedence: high
trigger:
gerrit:
- event: ref-updated
ref: ^refs/tags/.*$
success:
sqlreporter:
failure:
sqlreporter: