[buildbot] phase1, phase2: don't mark the build failed if a non-critical step fails

LEDE Commits lede-commits at lists.infradead.org
Thu Mar 25 08:57:56 GMT 2021


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/6385c5fef2ba1461725bcb9e8ec1f309ea1c08e8

commit 6385c5fef2ba1461725bcb9e8ec1f309ea1c08e8
Author: Baptiste Jonglez <git at bitsofnetworks.org>
AuthorDate: Wed Mar 24 23:48:13 2021 +0100

    phase1, phase2: don't mark the build failed if a non-critical step fails
    
    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 at bitsofnetworks.org>
---
 phase1/master.cfg |  6 ++++++
 phase2/master.cfg | 18 +++++++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index 363d77e..7e19e9e 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -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
 	))
 
diff --git a/phase2/master.cfg b/phase2/master.cfg
index 4d5e595..6a0f39f 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -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
 	))
 



More information about the lede-commits mailing list