Changeset 295738 in webkit
- Timestamp:
- Jun 22, 2022, 11:02:36 AM (4 years ago)
- Location:
- trunk/Tools/CISupport/ews-build
- Files:
-
- 4 edited
-
factories.py (modified) (3 diffs)
-
factories_unittest.py (modified) (3 diffs)
-
steps.py (modified) (1 diff)
-
steps_unittest.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/CISupport/ews-build/factories.py
r294545 r295738 35 35 SetBuildSummary, ShowIdentifier, TriggerCrashLogSubmission, UpdateWorkingDirectory, 36 36 ValidateCommitMessage, ValidateChange, ValidateCommitterAndReviewer, WaitForCrashCollection, 37 InstallBuiltProduct, V erifyGitHubIntegrity, ValidateSquashed)37 InstallBuiltProduct, ValidateSquashed) 38 38 39 39 … … 298 298 self.addStep(FetchBranches()) 299 299 self.addStep(ShowIdentifier()) 300 self.addStep(VerifyGitHubIntegrity())301 300 self.addStep(UpdateWorkingDirectory()) 302 301 self.addStep(CommitPatch()) … … 333 332 self.addStep(FetchBranches()) 334 333 self.addStep(ShowIdentifier()) 335 self.addStep(VerifyGitHubIntegrity())336 334 self.addStep(UpdateWorkingDirectory()) 337 335 self.addStep(CheckOutPullRequest()) -
trunk/Tools/CISupport/ews-build/factories_unittest.py
r294327 r295738 608 608 'fetch-branch-references', 609 609 'show-identifier', 610 'verify-github-integrity',611 610 'update-working-directory', 612 611 'commit-patch', … … 637 636 'fetch-branch-references', 638 637 'show-identifier', 639 'verify-github-integrity',640 638 'update-working-directory', 641 639 'checkout-pull-request', … … 663 661 'fetch-branch-references', 664 662 'show-identifier', 665 'verify-github-integrity',666 663 'update-working-directory', 667 664 'checkout-pull-request', -
trunk/Tools/CISupport/ews-build/steps.py
r295637 r295738 4709 4709 4710 4710 4711 # FIXME: Only needed when GitHub is a mirror, remove once GitHub is the source of truth4712 class VerifyGitHubIntegrity(shell.ShellCommand):4713 command = ['python3', 'Tools/Scripts/check-github-mirror-integrity']4714 name = 'verify-github-integrity'4715 haltOnFailure = True4716 4717 def __init__(self, **kwargs):4718 super(VerifyGitHubIntegrity, self).__init__(logEnviron=False, **kwargs)4719 4720 def getResultSummary(self):4721 if self.results != SUCCESS:4722 return {'step': 'GitHub integrity check failed'}4723 return {'step': 'Verified GitHub integrity'}4724 4725 def evaluateCommand(self, cmd):4726 rc = shell.ShellCommand.evaluateCommand(self, cmd)4727 if rc != SUCCESS:4728 self.send_email_for_github_issue()4729 return rc4730 4731 def send_email_for_github_issue(self):4732 try:4733 builder_name = self.getProperty('buildername', '')4734 build_url = '{}#/builders/{}/builds/{}'.format(self.master.config.buildbotURL, self.build._builderid, self.build.number)4735 email_subject = 'URGENT: GitHub integrity check failed'4736 email_text = 'URGENT issue on github repository. Integrity check failed.\n\nBuild: {}\n\nBuilder: {}'.format(build_url, builder_name)4737 send_email_to_github_admin(email_subject, email_text)4738 except Exception as e:4739 print('Error in sending email for github issue: {}'.format(e))4740 4741 4742 4711 class ValidateSquashed(shell.ShellCommand): 4743 4712 name = 'validate-squashed' -
trunk/Tools/CISupport/ews-build/steps_unittest.py
r295637 r295738 59 59 RunWebKitTestsWithoutChangeRedTree, AnalyzeLayoutTestsResultsRedTree, TestWithFailureCount, ShowIdentifier, 60 60 Trigger, TransferToS3, UnApplyPatch, UpdatePullRequest, UpdateWorkingDirectory, UploadBuiltProduct, 61 UploadTestResults, ValidateCommitMessage, ValidateCommitterAndReviewer, ValidateChange, 62 VerifyGitHubIntegrity, ValidateSquashed) 61 UploadTestResults, ValidateCommitMessage, ValidateCommitterAndReviewer, ValidateChange, ValidateSquashed) 63 62 64 63 # Workaround for https://github.com/buildbot/buildbot/issues/4669 … … 5641 5640 5642 5641 5643 class TestVerifyGitHubIntegrity(BuildStepMixinAdditions, unittest.TestCase):5644 def setUp(self):5645 self.longMessage = True5646 return self.setUpBuildStep()5647 5648 def tearDown(self):5649 return self.tearDownBuildStep()5650 5651 def test_success(self):5652 self.setupStep(VerifyGitHubIntegrity())5653 self.expectRemoteCommands(5654 ExpectShell(workdir='wkdir',5655 command=['python3', 'Tools/Scripts/check-github-mirror-integrity'],5656 logEnviron=False,5657 timeout=1200,5658 )5659 + 0,5660 )5661 self.expectOutcome(result=SUCCESS, state_string='Verified GitHub integrity')5662 return self.runStep()5663 5664 def test_failure(self):5665 self.setupStep(VerifyGitHubIntegrity())5666 self.expectRemoteCommands(5667 ExpectShell(workdir='wkdir',5668 command=['python3', 'Tools/Scripts/check-github-mirror-integrity'],5669 logEnviron=False,5670 timeout=1200,5671 )5672 + ExpectShell.log('stdio', stdout='Unexpected error.')5673 + 2,5674 )5675 self.expectOutcome(result=FAILURE, state_string='GitHub integrity check failed')5676 return self.runStep()5677 5678 5679 5642 class TestValidateSquashed(BuildStepMixinAdditions, unittest.TestCase): 5680 5643 def setUp(self):
Note:
See TracChangeset
for help on using the changeset viewer.