]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
keep images + preserve cache
authorHolger Levsen <holger@layer-acht.org>
Thu, 23 Aug 2012 11:08:48 +0000 (13:08 +0200)
committerHolger Levsen <holger@layer-acht.org>
Thu, 23 Aug 2012 11:08:48 +0000 (13:08 +0200)
liveboot_build.sh

index 5a9fd91bb004b429592c309a7cfdb9e7a67ebc95..a17dc4953960f1b8d2f508b0618fca8896bb017e 100755 (executable)
@@ -15,7 +15,7 @@ figlet "this is work in progress"
 BUILD_SCRIPT=$(mktemp)
 
 cat > $BUILD_SCRIPT <<-EOF
-cd /srv/build/liveboot
+cd /srv/build
 apt-get -y install debootstrap ldap-utils
 git clone git://git/ri/liveboot.git
 cd liveboot
@@ -23,6 +23,13 @@ git checkout feature/jenkins
 ./build.sh $BUILD_NUMBER
 EOF
 
-sudo pbuilder --execute --bindmounts /srv/build/liveboot -- $BUILD_SCRIPT
+sudo pbuilder --execute --bindmounts /srv/build/ -- $BUILD_SCRIPT
 
-ls /srv/build/liveboot/builds
+cd /srv/build/liveboot/builds
+mv *-* /srv/mirror/liveboot
+cd /srv/build/liveboot
+mv cache ..
+cd ..
+rm liveboot -Rf
+mkdir liveboot
+mv cache liveboot