phase1: fix issues in previous commit
authorJo-Philipp Wich <jo@mein.io>
Fri, 4 Nov 2016 12:06:45 +0000 (13:06 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 4 Nov 2016 12:06:45 +0000 (13:06 +0100)
 - Fix syntax error in expire.sh script
 - Download expire.sh into parent directory
 - Ensure that lifetime argument is passed as string when invoking expire.sh

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

index eeba668b3cc19d7d54a4b55f44a39f30231abab7..2313d196719f6878f39dab11794d690c1c7b66e4 100755 (executable)
@@ -10,7 +10,7 @@ if [ $max_lifetime -le 0 ]; then
 
 elif [ $tree_age -ge $max_lifetime ]; then
        echo "The build tree reached its maximum lifetime, cleaning up."
-       find . -mindepth 1 -maxdepth 1 -print0 | xargs -r -0 rm -vrf | while read entry do
+       find . -mindepth 1 -maxdepth 1 -print0 | xargs -r -0 rm -vrf | while read entry; do
                printf "."
        done
 
index 1389ae5216c227328f7c1e6c0919dcce6939c136..099f66653436b3fde4ed3178b5bfba4a344f8046 100644 (file)
@@ -279,13 +279,13 @@ for target in targets:
        if tree_expire > 0:
                factory.addStep(FileDownload(
                        mastersrc = "expire.sh",
-                       slavedest = "expire.sh",
+                       slavedest = "../expire.sh",
                        mode = 0755))
 
                factory.addStep(ShellCommand(
                        name = "expire",
                        description = "Checking for build tree expiry",
-                       command = ["./expire.sh", tree_expire],
+                       command = ["./expire.sh", str(tree_expire)],
                        workdir = ".",
                        haltOnFailure = True,
                        timeout = 2400))