phase2: improve source archive uploading
authorJo-Philipp Wich <jo@mein.io>
Fri, 21 Jun 2019 06:56:24 +0000 (08:56 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 21 Jun 2019 06:56:24 +0000 (08:56 +0200)
Only upload source archives which have been updated sicne the begin
of the build.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
phase2/master.cfg

index b3c1574883e2cdbe231ec840eac9afdcaad07f31..5a3f0058ae64dc664db10538c68e38eef48b17bc 100644 (file)
@@ -478,11 +478,19 @@ for arch in arches:
        ))
 
        if rsync_src_url is not None:
+               factory.addStep(ShellCommand(
+                       name = "sourcelist",
+                       description = "Finding source archives to upload",
+                       workdir = "build/sdk",
+                       command = "find dl/ -maxdepth 1 -type f -not -size 0 -not -name '.*' -newer ../sdk.archive -printf '%f\\n' > sourcelist",
+                       haltOnFailure = True
+               ))
+
                factory.addStep(ShellCommand(
                        name = "sourceupload",
                        description = "Uploading source archives",
                        workdir = "build/sdk",
-                       command = ["rsync", "-4", "--progress", "--checksum", "--delay-updates",
+                       command = ["rsync", "--files-from=sourcelist", "-4", "--progress", "--checksum", "--delay-updates",
                                   WithProperties("--partial-dir=.~tmp~%s~%%(slavename)s" %(arch[0])), "-avz", "dl/", "%s/" %(rsync_src_url)],
                        env={'RSYNC_PASSWORD': rsync_src_key},
                        haltOnFailure = False,