The pipeline configuration in Zuul allows specifying what is required in order to enqueue changes, as well as what are conditions to reject an item from the queue. However, the rejection filtering was not implemented in the GitLab driver so far. This commit introduces the missing mechanism, based on the existing implementation of the GitLab ref filter. The `reject.<gitlab source>.labels` follows the logic of `hashtag` attribute in Gerrit driver – if any specified label is present in the Merge Request, it will be rejected. Change-Id: I36cc5e0c13b9564a43875c733b0589c81ca94f5d
94 lines
1.7 KiB
YAML
94 lines
1.7 KiB
YAML
- pipeline:
|
|
name: check
|
|
manager: independent
|
|
require:
|
|
gitlab.com:
|
|
open: true
|
|
trigger:
|
|
gitlab.com:
|
|
- event: gl_merge_request
|
|
action: comment
|
|
comment: (?i)^\s*recheck\s*$
|
|
- event: gl_merge_request
|
|
action:
|
|
- opened
|
|
- changed
|
|
success:
|
|
gitlab.com:
|
|
comment: true
|
|
approval: true
|
|
failure:
|
|
gitlab.com:
|
|
comment: true
|
|
approval: false
|
|
|
|
- pipeline:
|
|
name: gate
|
|
manager: dependent
|
|
require:
|
|
gitlab.com:
|
|
open: true
|
|
labels:
|
|
- gateit
|
|
reject:
|
|
gitlab.com:
|
|
labels:
|
|
- do-not-merge
|
|
trigger:
|
|
gitlab.com:
|
|
- event: gl_merge_request
|
|
action:
|
|
- labeled
|
|
labels:
|
|
- gateit
|
|
success:
|
|
gitlab.com:
|
|
comment: true
|
|
approval: true
|
|
merge: true
|
|
failure:
|
|
gitlab.com:
|
|
comment: true
|
|
approval: false
|
|
start:
|
|
gitlab.com:
|
|
comment: true
|
|
approval: false
|
|
|
|
- pipeline:
|
|
name: promote
|
|
post-review: true
|
|
manager: supercedent
|
|
precedence: high
|
|
require:
|
|
gitlab.com:
|
|
merged: true
|
|
trigger:
|
|
gitlab.com:
|
|
- event: gl_merge_request
|
|
action: merged
|
|
success:
|
|
gitlab.com:
|
|
comment: true
|
|
failure:
|
|
gitlab.com:
|
|
comment: true
|
|
|
|
- pipeline:
|
|
name: post
|
|
post-review: true
|
|
manager: independent
|
|
trigger:
|
|
gitlab.com:
|
|
- event: gl_push
|
|
ref: ^refs/heads/.*$
|
|
|
|
- pipeline:
|
|
name: tag
|
|
post-review: true
|
|
manager: independent
|
|
trigger:
|
|
gitlab.com:
|
|
- event: gl_push
|
|
ref: ^refs/tags/.*$
|