]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
cleanup after build
authorHolger Levsen <holger@layer-acht.org>
Thu, 25 Oct 2012 15:11:00 +0000 (17:11 +0200)
committerHolger Levsen <holger@layer-acht.org>
Thu, 25 Oct 2012 15:11:00 +0000 (17:11 +0200)
liveboot_build.sh

index a8d1e9be01059dd3f3d77cd70432bd297142b0d3..767f16ca8d2b705b87db3960b833a09080f36f23 100755 (executable)
@@ -6,6 +6,13 @@
 set_failure() {
        BUILD_END=$(date +%s)
        $SCRIPTSDIR/liveboot2db.py $JOB_NAME $BUILD_NUMBER $REQUEST_ID $BUILD_START $BUILD_END "failed"
+       # cleanup mount points
+       cd /var/cache/pbuilder/build
+       echo "My PID: $$"
+       umount -l $$/proc || true
+       umount -l $$/dev || true
+       umount -l $$/dev/pts || true
+       umount -l $$/srv/build || true
         exit 1
 }