Title: [294116] trunk/Tools/CISupport/build-webkit-org/steps.py
Revision
294116
Author
[email protected]
Date
2022-05-12 13:08:08 -0700 (Thu, 12 May 2022)

Log Message

[build.webkit.org] Upload minified archives while building custom revision
https://bugs.webkit.org/show_bug.cgi?id=240354

Reviewed by Ryan Haddad.

* Tools/CISupport/build-webkit-org/steps.py:
(CompileWebKit.evaluateCommand):
(TransferToS3.__init__):
(TransferToS3.finished):

Canonical link: https://commits.webkit.org/250497@main

Modified Paths

Diff

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (294115 => 294116)


--- trunk/Tools/CISupport/build-webkit-org/steps.py	2022-05-12 20:03:18 UTC (rev 294115)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2022-05-12 20:08:08 UTC (rev 294116)
@@ -347,7 +347,13 @@
             log = yield self.addLog(logName)
         log.addStdout(message)
 
+    def evaluateCommand(self, cmd):
+        rc = shell.ShellCommand.evaluateCommand(self, cmd)
+        if rc in (SUCCESS, WARNINGS) and self.getProperty('user_provided_git_hash'):
+            self.build.addStepsAfterCurrentStep([ArchiveMinifiedBuiltProduct(), UploadMinifiedBuiltProduct(), TransferToS3(terminate_build=True)])
+        return rc
 
+
 class CompileLLINTCLoop(CompileWebKit):
     command = ["perl", "Tools/Scripts/build-jsc", "--cloop", WithProperties("--%(configuration)s")]
 
@@ -1174,9 +1180,10 @@
     command = ["python3", "../Shared/transfer-archive-to-s3", "--revision", revision, "--identifier", identifier, "--archive", archive]
     haltOnFailure = True
 
-    def __init__(self, **kwargs):
+    def __init__(self, terminate_build=False, **kwargs):
         kwargs['command'] = self.command
         kwargs['logEnviron'] = False
+        self.terminate_build = terminate_build
         master.MasterShellCommand.__init__(self, **kwargs)
 
     def start(self):
@@ -1183,7 +1190,10 @@
         return master.MasterShellCommand.start(self)
 
     def finished(self, result):
-        return master.MasterShellCommand.finished(self, result)
+        rc = master.MasterShellCommand.finished(self, result)
+        if self.terminate_build and self.getProperty('user_provided_git_hash'):
+            self.build.buildFinished([f"Uploaded archive with hash {self.getProperty('user_provided_git_hash', '')[:8]}"], SUCCESS)
+        return rc
 
     def doStepIf(self, step):
         return CURRENT_HOSTNAME == BUILD_WEBKIT_HOSTNAME
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to