zuul/doc/source/examples/pipelines/github-reference-pipelines....

140 lines
3.7 KiB
YAML

- pipeline:
name: check
description: |
Newly uploaded patchsets enter this pipeline to receive an
initial check status.
manager: independent
trigger:
github:
# Run this pipeline on new/changed pull requests
- event: pull_request
action:
- opened
- changed
- reopened
# Run in response to a pull request comment "recheck"
- event: pull_request
action: comment
comment: (?i)^\s*recheck\s*$
# When using the checks API to report results, failed runs
# will have a "re-run" button which emits this event.
- event: check_run
action: rerequested
check: .*/check:.*
start:
github:
check: 'in_progress'
comment: false
# It is recommended to use the checks API for consistency with
# other common CI tools that integrate with Github. Results
# will appear on the "checks" tab of PR and changes. There is
# generally no need to have Zuul leave comments when using the
# checks API.
#
# The older status API appears inline with the PR and can be
# enabled by uncommenting the "status:" in the various
# sections below. You should choose one or the other
# depending on project preferences.
#
#status: 'pending'
#comment: false
success:
github:
check: 'success'
comment: false
#status: 'success'
failure:
github:
check: 'failure'
comment: false
#status: 'failure'
dequeue:
github:
check: cancelled
comment: false
- pipeline:
name: gate
description: |
Changes that have been approved by core developers are enqueued
in order in this pipeline, and if they pass tests, will be
merged.
manager: dependent
precedence: high
supercedes: check
require:
github:
review:
# Require an approval from user with write access (e.g. core-reviewer)
- permission: write
type: approved
# Require label
label: gate
open: True
current-patchset: True
trigger:
github:
- event: pull_request_review
action: submitted
state: approved
- event: pull_request
action: comment
comment: (?i)^\s*regate\s*$
- event: pull_request_review
action: dismissed
state: request_changes
- event: pull_request
action: status
status: ".*:success"
- event: check_run
action: rerequested
check: .*/gate:.*
- event: pull_request
action: labeled
label:
- gate
start:
github:
check: 'in_progress'
comment: false
#status: 'pending'
success:
github:
check: 'success'
comment: false
#status: 'success'
merge: true
failure:
github:
check: 'failure'
#status: 'failure'
comment: false
dequeue:
github:
check: cancelled
comment: false
window-floor: 20
window-increase-factor: 2
- pipeline:
name: post
post-review: true
description: This pipeline runs jobs that operate after each change is merged.
manager: independent
precedence: low
trigger:
github:
- event: push
ref: ^refs/heads/.*$
- pipeline:
name: tag
description: This pipeline runs jobs in response to any tag event.
manager: independent
precedence: high
post-review: True
trigger:
github:
- event: push
ref: ^refs/tags/.*$