phase1, phase2: don't mark the build failed if a non-critical step fails
authorBaptiste Jonglez <git@bitsofnetworks.org>
Wed, 24 Mar 2021 22:48:13 +0000 (23:48 +0100)
committerPetr Štetiar <ynezz@true.cz>
Thu, 25 Mar 2021 08:50:42 +0000 (09:50 +0100)
Some steps are informative or optional (haltOnFailure=False), so it makes
no sense to mark the whole build as failed if such a step fails.

Depending on the case, we either mark the build as "warning"
(warnOnFailure=True) or as successful (warnOnFailure=False).

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
phase1/master.cfg
phase2/master.cfg

index 363d77e42fb4be3492f41ec683d4f525d5481998..7e19e9e6acafcc1feb22202ee21a7aa1af6bd7e7 100644 (file)
@@ -1350,6 +1350,8 @@ for target in targets:
                        command=["../rsync.sh", "--delete", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1]), "-a"] + rsync_bin_defopts + ["bin/packages/", "%s/packages/" %(rsync_bin_url)],
                        env={'RSYNC_PASSWORD': rsync_bin_key},
                        haltOnFailure = False,
+                       flunkOnFailure = False,
+                       warnOnFailure = True,
                        logEnviron = False,
                ))
 
@@ -1361,6 +1363,8 @@ for target in targets:
                        command=["../rsync.sh", "--delete", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1]), "-az"] + rsync_bin_defopts + ["logs/", "%s/logs/%s/%s/" %(rsync_bin_url, ts[0], ts[1])],
                        env={'RSYNC_PASSWORD': rsync_bin_key},
                        haltOnFailure = False,
+                       flunkOnFailure = False,
+                       warnOnFailure = True,
                        alwaysRun = True,
                        logEnviron = False,
                ))
@@ -1371,6 +1375,8 @@ for target in targets:
                command=["df", "-h", "."],
                env={'LC_ALL': 'C'},
                haltOnFailure = False,
+               flunkOnFailure = False,
+               warnOnFailure = False,
                alwaysRun = True
        ))
 
index 4d5e595a8da8fc91f0cccaed129f3b5345211c98..6a0f39fd3c8d0b852c16f4c07b1bea6d689a0b20 100644 (file)
@@ -604,7 +604,9 @@ for arch in arches:
                description = "Clearing failure logs",
                workdir = "build/sdk",
                command = ["rm", "-rf", "logs/package/error.txt", "faillogs/"],
-               haltOnFailure = False
+               haltOnFailure = False,
+               flunkOnFailure = False,
+               warnOnFailure = True,
        ))
 
        factory.addStep(ShellCommand(
@@ -701,7 +703,9 @@ for arch in arches:
                description = "Finding failure logs",
                workdir = "build/sdk/logs/package/feeds",
                command = ["sh", "-c", "sed -ne 's!^ *ERROR: package/feeds/\\([^ ]*\\) .*$!\\1!p' ../error.txt | sort -u | xargs -r find > ../../../logs.txt"],
-               haltOnFailure = False
+               haltOnFailure = False,
+               flunkOnFailure = False,
+               warnOnFailure = True,
        ))
 
        factory.addStep(ShellCommand(
@@ -709,7 +713,9 @@ for arch in arches:
                description = "Collecting failure logs",
                workdir = "build/sdk",
                command = ["rsync", "-av", "--files-from=logs.txt", "logs/package/feeds/", "faillogs/"],
-               haltOnFailure = False
+               haltOnFailure = False,
+               flunkOnFailure = False,
+               warnOnFailure = True,
        ))
 
        factory.addStep(ShellCommand(
@@ -719,6 +725,8 @@ for arch in arches:
                command = ["rsync", "-4", "--progress", "--delete", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-avz", "faillogs/", WithProperties("%s/faillogs%%(suffix)s/%s/" %(rsync_bin_url, arch[0]), suffix=GetDirectorySuffix)],
                env={'RSYNC_PASSWORD': rsync_bin_key},
                haltOnFailure = False,
+               flunkOnFailure = False,
+               warnOnFailure = True,
                logEnviron = False
        ))
 
@@ -739,6 +747,8 @@ for arch in arches:
                                   WithProperties("--partial-dir=.~tmp~%s~%%(workername)s" %(arch[0])), "-avz", "dl/", "%s/" %(rsync_src_url)],
                        env={'RSYNC_PASSWORD': rsync_src_key},
                        haltOnFailure = False,
+                       flunkOnFailure = False,
+                       warnOnFailure = True,
                        logEnviron = False
                ))
 
@@ -748,6 +758,8 @@ for arch in arches:
                command=["df", "-h", "."],
                env={'LC_ALL': 'C'},
                haltOnFailure = False,
+               flunkOnFailure = False,
+               warnOnFailure = False,
                alwaysRun = True
        ))