WebKit Bugzilla
Attachment 369983 Details for
Bug 197922
: [ews-build] Add build step to Transfer archive to S3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197922-20190515153617.patch (text/plain), 6.59 KB, created by
Aakash Jain
on 2019-05-15 12:36:18 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2019-05-15 12:36:18 PDT
Size:
6.59 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 245338) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2019-05-15 Aakash Jain <aakash_jain@apple.com> >+ >+ [ews-build] Add build step to Transfer archive to S3 >+ https://bugs.webkit.org/show_bug.cgi?id=197922 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/ews-build/steps.py: >+ (TransferToS3): >+ (TransferToS3.finished): Invoke triggers after transfer is successful. >+ (TransferToS3.getResultSummary): Create more readable failure string. >+ (UploadBuiltProduct.finished): Deleted. Moved the trigger invocation after TransferToS3. >+ * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. >+ > 2019-05-15 Wenson Hsieh <wenson_hsieh@apple.com> > > inputmode="numeric" should show a number pad with digits 0-9, instead of the numeric keyplane >Index: Tools/BuildSlaveSupport/ews-build/steps.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps.py (revision 245337) >+++ Tools/BuildSlaveSupport/ews-build/steps.py (working copy) >@@ -769,18 +769,39 @@ class UploadBuiltProduct(transfer.FileUp > kwargs['blocksize'] = 1024 * 256 > transfer.FileUpload.__init__(self, **kwargs) > >+ def getResultSummary(self): >+ if self.results != SUCCESS: >+ return {u'step': u'Failed to upload built product'} >+ return super(UploadBuiltProduct, self).getResultSummary() >+ >+ >+class TransferToS3(master.MasterShellCommand): >+ name = 'transfer-to-s3' >+ description = ['transferring to s3'] >+ descriptionDone = ['Transferred archive to S3'] >+ archive = WithProperties('public_html/archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(patch_id)s.zip') >+ identifier = WithProperties('%(fullPlatform)s-%(architecture)s-%(configuration)s') >+ patch_id = WithProperties('%(patch_id)s') >+ command = ['python', '../Shared/transfer-archive-to-s3', '--patch_id', patch_id, '--identifier', identifier, '--archive', archive, '--ews'] >+ haltOnFailure = True >+ flunkOnFailure = True >+ >+ def __init__(self, **kwargs): >+ kwargs['command'] = self.command >+ master.MasterShellCommand.__init__(self, logEnviron=False, **kwargs) >+ > def finished(self, results): > if results == SUCCESS: > triggers = self.getProperty('triggers', None) > if triggers: > self.build.addStepsAfterCurrentStep([Trigger(schedulerNames=triggers)]) > >- return super(UploadBuiltProduct, self).finished(results) >+ return super(TransferToS3, self).finished(results) > > def getResultSummary(self): > if self.results != SUCCESS: >- return {u'step': u'Failed to upload built product'} >- return super(UploadBuiltProduct, self).getResultSummary() >+ return {u'step': u'Failed to transfer archive to S3'} >+ return super(TransferToS3, self).getResultSummary() > > > class DownloadBuiltProduct(shell.ShellCommand): >Index: Tools/BuildSlaveSupport/ews-build/steps_unittest.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps_unittest.py (revision 245337) >+++ Tools/BuildSlaveSupport/ews-build/steps_unittest.py (working copy) >@@ -40,8 +40,8 @@ from steps import (AnalyzeAPITestsResult > DownloadBuiltProduct, ExtractBuiltProduct, ExtractTestResults, KillOldProcesses, > PrintConfiguration, ReRunAPITests, ReRunJavaScriptCoreTests, RunAPITests, RunAPITestsWithoutPatch, > RunBindingsTests, RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests, RunWebKitPerlTests, >- RunWebKitPyTests, RunWebKitTests, TestWithFailureCount, Trigger, UnApplyPatchIfRequired, UploadBuiltProduct, >- UploadTestResults, ValidatePatch) >+ RunWebKitPyTests, RunWebKitTests, TestWithFailureCount, Trigger, TransferToS3, UnApplyPatchIfRequired, >+ UploadBuiltProduct, UploadTestResults, ValidatePatch) > > # Workaround for https://github.com/buildbot/buildbot/issues/4669 > from buildbot.test.fake.fakebuild import FakeBuild >@@ -1075,6 +1075,53 @@ class TestExtractBuiltProduct(BuildStepM > return self.runStep() > > >+class TestTransferToS3(BuildStepMixinAdditions, unittest.TestCase): >+ def setUp(self): >+ self.longMessage = True >+ return self.setUpBuildStep() >+ >+ def tearDown(self): >+ return self.tearDownBuildStep() >+ >+ def test_success(self): >+ self.setupStep(TransferToS3()) >+ self.setProperty('fullPlatform', 'mac-highsierra') >+ self.setProperty('configuration', 'release') >+ self.setProperty('architecture', 'x86_64') >+ self.setProperty('patch_id', '1234') >+ self.expectLocalCommands( >+ ExpectMasterShellCommand(command=['python', >+ '../Shared/transfer-archive-to-s3', >+ '--patch_id', '1234', >+ '--identifier', 'mac-highsierra-x86_64-release', >+ '--archive', 'public_html/archives/mac-highsierra-x86_64-release/1234.zip', >+ '--ews', >+ ]) >+ + 0, >+ ) >+ self.expectOutcome(result=SUCCESS, state_string='Transferred archive to S3') >+ return self.runStep() >+ >+ def test_failure(self): >+ self.setupStep(TransferToS3()) >+ self.setProperty('fullPlatform', 'ios-simulator-12') >+ self.setProperty('configuration', 'debug') >+ self.setProperty('architecture', 'x86_64') >+ self.setProperty('patch_id', '1234') >+ self.expectLocalCommands( >+ ExpectMasterShellCommand(command=['python', >+ '../Shared/transfer-archive-to-s3', >+ '--patch_id', '1234', >+ '--identifier', 'ios-simulator-12-x86_64-debug', >+ '--archive', 'public_html/archives/ios-simulator-12-x86_64-debug/1234.zip', >+ '--ews', >+ ]) >+ + 2, >+ ) >+ self.expectOutcome(result=FAILURE, state_string='Failed to transfer archive to S3') >+ return self.runStep() >+ >+ > class TestRunAPITests(BuildStepMixinAdditions, unittest.TestCase): > def setUp(self): > self.longMessage = True
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197922
:
369983
|
369998
|
370000