exit 1
fi
- for build_dir in ../../*; do
+ for build_dir in ../*; do
build_dir="$(readlink -f "$build_dir")"
)
done
-) 200>../../cleanup.lock
+) 200>../cleanup.lock
#
# Clean up current build
#
else
- do_cleanup
+ if [ -d build ]; then (
+ cd build
+ do_cleanup
+ ); fi
fi
exit 0
# cleanup.sh if needed
factory.addStep(FileDownload(
mastersrc = "cleanup.sh",
- slavedest = "cleanup.sh",
+ slavedest = "../cleanup.sh",
mode = 0755,
doStepIf = IsCleanupRequested))
name = "cleanold",
description = "Cleaning previous builds",
command = ["./cleanup.sh", c['buildbotURL'], WithProperties("%(slavename)s"), WithProperties("%(buildername)s"), "full"],
+ workdir = ".",
haltOnFailure = True,
doStepIf = IsCleanupRequested,
timeout = 2400))
name = "cleanup",
description = "Cleaning work area",
command = ["./cleanup.sh", c['buildbotURL'], WithProperties("%(slavename)s"), WithProperties("%(buildername)s"), "single"],
+ workdir = ".",
haltOnFailure = True,
doStepIf = IsCleanupRequested,
timeout = 2400))