From e98321de8f6002d6ed056b23ecdfcd0732ac153a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 10 Nov 2012 01:50:20 +0100 Subject: pbuilder d-i manual --- bin/d-i_manual.sh | 34 ++++++++++++++++++++++++++++++++++ bin/housekeeping.sh | 3 ++- etc/sudoers.d/jenkins | 2 +- job-cfg/d-i.yaml | 2 +- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100755 bin/d-i_manual.sh mode change 100644 => 100755 etc/sudoers.d/jenkins diff --git a/bin/d-i_manual.sh b/bin/d-i_manual.sh new file mode 100755 index 00000000..eddbc3ad --- /dev/null +++ b/bin/d-i_manual.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Copyright 2012 Holger Levsen +# released under the GPLv=2 + + +set -x +set -e +export LANG=C +export MIRROR=http://ftp.de.debian.org/debian +export http_proxy="http://localhost:3128" + +# +# clean +# +rm -fv *.deb *.dsc *_*.build *_*.changes *_*.tar.gz + +# +# prepare build +# +cd manual +sudo pdebuild +if [ -f /var/base.tgz ] ; then + sudo pbuilder --create +else + sudo pbuilder --update +fi + +# +# build +# +cd .. +sudo pbuilder --build *dsc + diff --git a/bin/housekeeping.sh b/bin/housekeeping.sh index 15ba7e50..aef1d727 100755 --- a/bin/housekeeping.sh +++ b/bin/housekeeping.sh @@ -8,7 +8,8 @@ uptime echo df -h echo -for DIR in /var/cache/apt/archives/ /var/spool/squid/ /var/lib/jenkins/jobs/ ; do +# FIXME: make this a general and a specific housekeeping job: +for DIR in /var/cache/apt/archives/ /var/spool/squid/ /var/lib/jenkins/jobs/ /var/cache/pbuilder/build/ ; do sudo du -sh $DIR done echo diff --git a/etc/sudoers.d/jenkins b/etc/sudoers.d/jenkins old mode 100644 new mode 100755 index fcc579c5..39d15131 --- a/etc/sudoers.d/jenkins +++ b/etc/sudoers.d/jenkins @@ -1,4 +1,4 @@ -jenkins ALL= NOPASSWD: /usr/sbin/debootstrap *, NOPASSWD: /usr/sbin/chroot /chroots/*, NOPASSWD: /bin/rm -rf /chroots/*, NOPASSWD: /bin/umount -l /chroots/*, NOPASSWD: /usr/bin/du * +jenkins ALL= NOPASSWD: /usr/sbin/debootstrap *, NOPASSWD: /usr/sbin/chroot /chroots/*, NOPASSWD: /bin/rm -rf /chroots/*, NOPASSWD: /bin/umount -l /chroots/*, NOPASSWD: /usr/bin/du *, NOPASSWD: /usr/sbin/pbuilder * # keep these environment variables Defaults env_keep += "http_proxy", env_reset diff --git a/job-cfg/d-i.yaml b/job-cfg/d-i.yaml index 7ef7f821..a2fd8626 100644 --- a/job-cfg/d-i.yaml +++ b/job-cfg/d-i.yaml @@ -36,7 +36,7 @@ excludedCommitMessages: '' viewvc-url: http://anonscm.debian.org/viewvc/d-i/trunk builders: - - shell: 'ls' + - shell: '/srv/jenkins/bin/d-i_manual.sh' triggers: - pollscm: "*/30 * * * *" publishers: -- cgit v1.2.3-70-g09d2