Changeset 245461 in webkit
- Timestamp:
- May 17, 2019 7:32:17 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/ews-build/steps.py
r245433 r245461 616 616 self.build.addStepsAfterCurrentStep([UnApplyPatchIfRequired(), CompileWebKitToT()]) 617 617 else: 618 self.build.addStepsAfterCurrentStep([ArchiveBuiltProduct(), UploadBuiltProduct() ])618 self.build.addStepsAfterCurrentStep([ArchiveBuiltProduct(), UploadBuiltProduct(), TransferToS3()]) 619 619 620 620 return super(CompileWebKit, self).evaluateCommand(cmd) … … 770 770 transfer.FileUpload.__init__(self, **kwargs) 771 771 772 def getResultSummary(self): 773 if self.results != SUCCESS: 774 return {u'step': u'Failed to upload built product'} 775 return super(UploadBuiltProduct, self).getResultSummary() 776 777 778 class TransferToS3(master.MasterShellCommand): 779 name = 'transfer-to-s3' 780 description = ['transferring to s3'] 781 descriptionDone = ['Transferred archive to S3'] 782 archive = WithProperties('public_html/archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(patch_id)s.zip') 783 identifier = WithProperties('%(fullPlatform)s-%(architecture)s-%(configuration)s') 784 patch_id = WithProperties('%(patch_id)s') 785 command = ['python', '../Shared/transfer-archive-to-s3', '--patch_id', patch_id, '--identifier', identifier, '--archive', archive] 786 haltOnFailure = True 787 flunkOnFailure = True 788 789 def __init__(self, **kwargs): 790 kwargs['command'] = self.command 791 master.MasterShellCommand.__init__(self, logEnviron=False, **kwargs) 792 772 793 def finished(self, results): 773 794 if results == SUCCESS: … … 776 797 self.build.addStepsAfterCurrentStep([Trigger(schedulerNames=triggers)]) 777 798 778 return super( UploadBuiltProduct, self).finished(results)799 return super(TransferToS3, self).finished(results) 779 800 780 801 def getResultSummary(self): 781 802 if self.results != SUCCESS: 782 return {u'step': u'Failed to upload built product'}783 return super( UploadBuiltProduct, self).getResultSummary()803 return {u'step': u'Failed to transfer archive to S3'} 804 return super(TransferToS3, self).getResultSummary() 784 805 785 806 -
trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py
r245433 r245461 41 41 PrintConfiguration, ReRunAPITests, ReRunJavaScriptCoreTests, RunAPITests, RunAPITestsWithoutPatch, 42 42 RunBindingsTests, RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests, RunWebKitPerlTests, 43 RunWebKitPyTests, RunWebKitTests, TestWithFailureCount, Trigger, UnApplyPatchIfRequired, UploadBuiltProduct,44 Upload TestResults, ValidatePatch)43 RunWebKitPyTests, RunWebKitTests, TestWithFailureCount, Trigger, TransferToS3, UnApplyPatchIfRequired, 44 UploadBuiltProduct, UploadTestResults, ValidatePatch) 45 45 46 46 # Workaround for https://github.com/buildbot/buildbot/issues/4669 … … 1071 1071 ) 1072 1072 self.expectOutcome(result=FAILURE, state_string='Extracted built product (failure)') 1073 return self.runStep() 1074 1075 1076 class TestTransferToS3(BuildStepMixinAdditions, unittest.TestCase): 1077 def setUp(self): 1078 self.longMessage = True 1079 return self.setUpBuildStep() 1080 1081 def tearDown(self): 1082 return self.tearDownBuildStep() 1083 1084 def test_success(self): 1085 self.setupStep(TransferToS3()) 1086 self.setProperty('fullPlatform', 'mac-highsierra') 1087 self.setProperty('configuration', 'release') 1088 self.setProperty('architecture', 'x86_64') 1089 self.setProperty('patch_id', '1234') 1090 self.expectLocalCommands( 1091 ExpectMasterShellCommand(command=['python', 1092 '../Shared/transfer-archive-to-s3', 1093 '--patch_id', '1234', 1094 '--identifier', 'mac-highsierra-x86_64-release', 1095 '--archive', 'public_html/archives/mac-highsierra-x86_64-release/1234.zip', 1096 ]) 1097 + 0, 1098 ) 1099 self.expectOutcome(result=SUCCESS, state_string='Transferred archive to S3') 1100 return self.runStep() 1101 1102 def test_failure(self): 1103 self.setupStep(TransferToS3()) 1104 self.setProperty('fullPlatform', 'ios-simulator-12') 1105 self.setProperty('configuration', 'debug') 1106 self.setProperty('architecture', 'x86_64') 1107 self.setProperty('patch_id', '1234') 1108 self.expectLocalCommands( 1109 ExpectMasterShellCommand(command=['python', 1110 '../Shared/transfer-archive-to-s3', 1111 '--patch_id', '1234', 1112 '--identifier', 'ios-simulator-12-x86_64-debug', 1113 '--archive', 'public_html/archives/ios-simulator-12-x86_64-debug/1234.zip', 1114 ]) 1115 + 2, 1116 ) 1117 self.expectOutcome(result=FAILURE, state_string='Failed to transfer archive to S3') 1073 1118 return self.runStep() 1074 1119 -
trunk/Tools/ChangeLog
r245460 r245461 1 2019-05-17 Aakash Jain <aakash_jain@apple.com> 2 3 [ews-build] Add build step to Transfer archive to S3 4 https://bugs.webkit.org/show_bug.cgi?id=197922 5 6 Reviewed by Jonathan Bedard. 7 8 * BuildSlaveSupport/ews-build/steps.py: 9 (TransferToS3): 10 (TransferToS3.finished): Invoke triggers after transfer is successful. 11 (TransferToS3.getResultSummary): Create more readable failure string. 12 (UploadBuiltProduct.finished): Deleted. Moved the trigger invocation after TransferToS3. 13 * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 14 1 15 2019-05-16 Carlos Garcia Campos <cgarcia@igalia.com> 2 16
Note: See TracChangeset
for help on using the changeset viewer.