public inbox for buildbot@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Wrap the four separate pass .bunsen.source.* steps into one
@ 2024-05-16 20:17 Mark Wielaard
  2024-05-18 17:10 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2024-05-16 20:17 UTC (permalink / raw)
  To: buildbot; +Cc: Mark Wielaard

Each step separately can take up to 30 seconds to execute. But they can
be executed as one shell command. Saving up to 1.5 minute per build.
---
 builder/master.cfg | 46 ++++++++++++++++++++++++++++------------------
 1 file changed, 28 insertions(+), 18 deletions(-)

diff --git a/builder/master.cfg b/builder/master.cfg
index eab53df7fe43..3693f9c084fa 100644
--- a/builder/master.cfg
+++ b/builder/master.cfg
@@ -1434,15 +1434,20 @@ def bunsen_logfile_upload_steps(files,
                                                   keepstamp=True,
                                                   glob=True))
 
-        s.append(steps.MasterShellCommand(name="pass .bunsen.source.gitname",
-                                          command=util.Interpolate("echo %(prop:got_revision)s > "+bunsen_tmpdir+"/.bunsen.source.gitname")))
-        s.append(steps.MasterShellCommand(name="pass .bunsen.source.gitdescribe",
-                                          command=util.Interpolate("echo %(prop:commit-description)s > "+bunsen_tmpdir+"/.bunsen.source.gitdescribe"),
-                                          haltOnFailure=False,flunkOnFailure=False))
-        s.append(steps.MasterShellCommand(name="pass .bunsen.source.gitbranch",
-                                          command=util.Interpolate("echo %(src::branch)s > "+bunsen_tmpdir+"/.bunsen.source.gitbranch")))
-        s.append(steps.MasterShellCommand(name="pass .bunsen.source.gitrepo",
-                                          command=util.Interpolate("echo %(src::repository)s > "+bunsen_tmpdir+"/.bunsen.source.gitrepo")))
+        s.append(steps.MasterShellCommand(name="pass .bunsen.source.*",
+                                          command=util.Interpolate(
+                                        "echo %(prop:got_revision)s > "
+                                        + bunsen_tmpdir
+                                        + "/.bunsen.source.gitname;"
+                                        + "echo %(prop:commit-description)s > "
+                                        + bunsen_tmpdir
+                                        + "/.bunsen.source.gitdescribe;"
+                                        + "echo %(src::branch)s > "
+                                        + bunsen_tmpdir
+                                        + "/.bunsen.source.gitbranch;"
+                                        + "echo %(src::repository)s > "
+                                        + bunsen_tmpdir
+                                        + "/.bunsen.source.gitrepo")))
         s.append(BunsenUploadStep(name="upload to bunsen",
                                   command=util.Interpolate("cd "+bunsen_tmpdir+";" +
                                                            "find . | "+bunsencmd+" "+bunsendb+" "+bunsentag+tagsuffix+ " | " +
@@ -1486,15 +1491,20 @@ def bunsen_logfile_upload_cpio_steps(paths, # [FOO, BAR] fed to cpio ( -ipath FO
         s.append(steps.MasterShellCommand(name="unpack bunsen.cpio.gz",
                                           command=util.Interpolate("cd "+bunsen_tmpdir+"; gunzip < bunsen.cpio.gz | cpio -id ; rm bunsen.cpio.gz")))
 
-        s.append(steps.MasterShellCommand(name="pass .bunsen.source.gitname",
-                                          command=util.Interpolate("echo %(prop:got_revision)s > "+bunsen_tmpdir+"/.bunsen.source.gitname")))
-        s.append(steps.MasterShellCommand(name="pass .bunsen.source.gitdescribe",
-                                          command=util.Interpolate("echo %(prop:commit-description)s > "+bunsen_tmpdir+"/.bunsen.source.gitdescribe"),
-                                          haltOnFailure=False,flunkOnFailure=False))
-        s.append(steps.MasterShellCommand(name="pass .bunsen.source.gitbranch",
-                                          command=util.Interpolate("echo %(src::branch)s > "+bunsen_tmpdir+"/.bunsen.source.gitbranch")))
-        s.append(steps.MasterShellCommand(name="pass .bunsen.source.gitrepo",
-                                          command=util.Interpolate("echo %(src::repository)s > "+bunsen_tmpdir+"/.bunsen.source.gitrepo")))
+        s.append(steps.MasterShellCommand(name="pass .bunsen.source.*",
+                                          command=util.Interpolate(
+                                        "echo %(prop:got_revision)s > "
+                                        + bunsen_tmpdir
+                                        + "/.bunsen.source.gitname;"
+                                        + "echo %(prop:commit-description)s > "
+                                        + bunsen_tmpdir
+                                        + "/.bunsen.source.gitdescribe;"
+                                        + "echo %(src::branch)s > "
+                                        + bunsen_tmpdir
+                                        + "/.bunsen.source.gitbranch;"
+                                        + "echo %(src::repository)s > "
+                                        + bunsen_tmpdir
+                                        + "/.bunsen.source.gitrepo")))
         s.append(BunsenUploadStep(name="upload to bunsen",
                                   command=util.Interpolate("cd "+bunsen_tmpdir+";" +
                                                            "find . | "+bunsencmd+" "+bunsendb+" "+bunsentag+tagsuffix+ " | " +
-- 
2.39.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Wrap the four separate pass .bunsen.source.* steps into one
  2024-05-16 20:17 [PATCH] Wrap the four separate pass .bunsen.source.* steps into one Mark Wielaard
@ 2024-05-18 17:10 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2024-05-18 17:10 UTC (permalink / raw)
  To: buildbot

Hi,

On Thu, May 16, 2024 at 10:17:21PM +0200, Mark Wielaard wrote:
> Each step separately can take up to 30 seconds to execute. But they can
> be executed as one shell command. Saving up to 1.5 minute per build.

I pushed this to main.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-18 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-16 20:17 [PATCH] Wrap the four separate pass .bunsen.source.* steps into one Mark Wielaard
2024-05-18 17:10 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).