Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/248857
Change subject: Use resubmit to allow jenkins to re merge ...................................................................... Use resubmit to allow jenkins to re merge Author of these code is Hashar. And resubmit idea is Legoktm idea. Original code at https://gerrit.wikimedia.org/r/#/c/227223/ Change-Id: I74379b758a4b5a99bca702db604284e30f4fb3c7 --- M tests/test_zuul_layout.py M zuul/layout.yaml 2 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/57/248857/1 diff --git a/tests/test_zuul_layout.py b/tests/test_zuul_layout.py index a4a774c..8e2b3c9 100644 --- a/tests/test_zuul_layout.py +++ b/tests/test_zuul_layout.py @@ -318,6 +318,35 @@ event.account = {'email': '[email protected]'} self.assertFalse(test_manager.eventMatches(event, change)) + def test_recheck_on_approved_change_triggers_gate(self): + gate_manager = self.getPipeline('gate-and-submit').manager + + change = zuul.model.Change('mediawiki/core') + change.approvals = [{'type': 'Code-Review', + 'description': 'Code Review', + 'value': '2', + 'by': {'email': '[email protected]'}, + }] + + event = zuul.model.TriggerEvent() + event.type = 'comment-added' + event.comment = 'Patch Set 1:\n\nresubmit' + + self.assertTrue(gate_manager.eventMatches(event, change), + "gate-and-submit pipeline must process 'resubmit' " + "on CR+2") + + indep_pipelines = [p for p in self.getPipelines() + if p.manager.__class__.__name__ == + 'IndependentPipelineManager'] + self.assertGreater(len(indep_pipelines), 0) + + for pipeline in indep_pipelines: + # XXX need to bump our Zuul version to supports negative filters + self.assertFalse(pipeline.manager.eventMatches(event, change), + "Independent pipeline %s must not process " + "'resubmit' on CR+2" % pipeline.name) + def test_pipelines_trustiness(self): check_manager = self.getPipeline('check').manager test_manager = self.getPipeline('test').manager diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 959117d..d1943cb 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -479,6 +479,10 @@ - ^(?!l10n-bot@translatewiki\.net).*$ approval: - code-review: 2 + - event: comment-added + comment_filter: (?im)^Patch Set \d+:\n\n\s*resubmit\.?\s*$ + require-approval: + - code-review: 2 start: gerrit: verified: 0 -- To view, visit https://gerrit.wikimedia.org/r/248857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74379b758a4b5a99bca702db604284e30f4fb3c7 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Paladox <[email protected]> Gerrit-Reviewer: Hashar <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
