From: Thibaut VARÈNE Date: Thu, 21 Jun 2018 10:22:00 +0000 (+0200) Subject: phase1: don't expire the tree if cleanup is requested X-Git-Tag: v1~149 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=87b5d0fe88ab4ea303e0f427baf2473b0c018120;p=buildbot.git phase1: don't expire the tree if cleanup is requested expire.sh will wipe the git repository, which is unnecessary and adds overhead (redownload) if cleanup is already enacted. Signed-off-by: Thibaut VARÈNE --- diff --git a/phase1/master.cfg b/phase1/master.cfg index cb0e709..5f7ca8e 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -235,6 +235,9 @@ def IsCleanupRequested(step): else: return False +def IsExpireRequested(step): + return not IsCleanupRequested(step) + def IsTaggingRequested(step): val = step.getProperty("tag") if val and re.match("^[0-9]+\.[0-9]+\.[0-9]+(?:-rc[0-9]+)?$", val): @@ -430,6 +433,7 @@ for target in targets: # expire tree if needed if tree_expire > 0: factory.addStep(FileDownload( + doStepIf = IsExpireRequested, mastersrc = "expire.sh", slavedest = "../expire.sh", mode = 0755)) @@ -440,6 +444,7 @@ for target in targets: command = ["./expire.sh", str(tree_expire)], workdir = ".", haltOnFailure = True, + doStepIf = IsExpireRequested, timeout = 2400)) # cleanup.sh if needed