Merge "Fix dynamic layout with regex approval filters" into feature/zuulv3
This commit is contained in:
commit
1bb4713a04
@ -52,6 +52,23 @@
|
||||
Verified: 0
|
||||
precedence: high
|
||||
|
||||
# This pipeline is there to ensure that dynamic pipeline copy operations also
|
||||
# work with regex approval filters.
|
||||
- pipeline:
|
||||
name: pipeline-with-regex
|
||||
manager: independent
|
||||
require:
|
||||
gerrit:
|
||||
approval:
|
||||
- Code-Review: 2
|
||||
username: maintainer
|
||||
require:
|
||||
github:
|
||||
review:
|
||||
- username: '^(herp|derp)$'
|
||||
type: approved
|
||||
trigger: {}
|
||||
|
||||
- job:
|
||||
name: common-config-test
|
||||
|
||||
|
@ -5293,6 +5293,7 @@ class TestSemaphoreMultiTenant(ZuulTestCase):
|
||||
|
||||
|
||||
class TestSemaphoreInRepo(ZuulTestCase):
|
||||
config_file = 'zuul-connections-gerrit-and-github.conf'
|
||||
tenant_config_file = 'config/in-repo/main.yaml'
|
||||
|
||||
def test_semaphore_in_repo(self):
|
||||
|
@ -70,6 +70,7 @@ class TestMultipleTenants(AnsibleZuulTestCase):
|
||||
class TestInRepoConfig(ZuulTestCase):
|
||||
# A temporary class to hold new tests while others are disabled
|
||||
|
||||
config_file = 'zuul-connections-gerrit-and-github.conf'
|
||||
tenant_config_file = 'config/in-repo/main.yaml'
|
||||
|
||||
def test_in_repo_config(self):
|
||||
@ -712,6 +713,7 @@ class TestProjectKeys(ZuulTestCase):
|
||||
# sure we exercise that code, in this test we allow Zuul to create
|
||||
# keys for the project on startup.
|
||||
create_project_keys = True
|
||||
config_file = 'zuul-connections-gerrit-and-github.conf'
|
||||
tenant_config_file = 'config/in-repo/main.yaml'
|
||||
|
||||
def test_key_generation(self):
|
||||
|
@ -61,9 +61,10 @@ class GerritTriggerEvent(TriggerEvent):
|
||||
class GerritApprovalFilter(object):
|
||||
def __init__(self, required_approvals=[], reject_approvals=[]):
|
||||
self._required_approvals = copy.deepcopy(required_approvals)
|
||||
self.required_approvals = self._tidy_approvals(required_approvals)
|
||||
self.required_approvals = self._tidy_approvals(
|
||||
self._required_approvals)
|
||||
self._reject_approvals = copy.deepcopy(reject_approvals)
|
||||
self.reject_approvals = self._tidy_approvals(reject_approvals)
|
||||
self.reject_approvals = self._tidy_approvals(self._reject_approvals)
|
||||
|
||||
def _tidy_approvals(self, approvals):
|
||||
for a in approvals:
|
||||
|
@ -68,8 +68,8 @@ class GithubCommonFilter(object):
|
||||
reject_reviews=[]):
|
||||
self._required_reviews = copy.deepcopy(required_reviews)
|
||||
self._reject_reviews = copy.deepcopy(reject_reviews)
|
||||
self.required_reviews = self._tidy_reviews(required_reviews)
|
||||
self.reject_reviews = self._tidy_reviews(reject_reviews)
|
||||
self.required_reviews = self._tidy_reviews(self._required_reviews)
|
||||
self.reject_reviews = self._tidy_reviews(self._reject_reviews)
|
||||
self.required_statuses = required_statuses
|
||||
|
||||
def _tidy_reviews(self, reviews):
|
||||
|
Loading…
Reference in New Issue
Block a user