diff options
author | Holger Levsen <holger@layer-acht.org> | 2012-12-02 03:23:47 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2012-12-02 03:23:47 +0100 |
commit | c5a1fed413353f7f474dd055cc9f34a58770f9d1 (patch) | |
tree | 4d894bd2ec898bb6e26d7bc866b561e8ef818afd | |
parent | 687c2bdb601633419f12f3a7382fa631d5d2233d (diff) | |
download | jenkins.debian.net-c5a1fed413353f7f474dd055cc9f34a58770f9d1.tar.xz |
fixup: implement basics for cd tests
-rwxr-xr-x | bin/cd_tester.sh | 16 | ||||
-rwxr-xr-x | etc/sudoers.d/jenkins | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/bin/cd_tester.sh b/bin/cd_tester.sh index 4860683a..00fcb85a 100755 --- a/bin/cd_tester.sh +++ b/bin/cd_tester.sh @@ -27,14 +27,14 @@ export http_proxy="http://localhost:3128" # # init # -rm -f results -mkdir -p results -cd results DISPLAY=$1 NAME=$2 IMAGE_URL=$3 -IMAGE=$(basename $IMAGE_URL) +IMAGE=$(pwd)./$(basename $IMAGE_URL) IMAGE_MNT="/media/cd-$IMAGE.iso" +rm -rf results +mkdir -p results +cd results cleanup_all() { # @@ -44,7 +44,7 @@ cleanup_all() { # # cleanup # - umount $IMAGE_MNT + sudo umount $IMAGE_MNT sudo rm $NAME.qcow # # create video @@ -90,13 +90,13 @@ monitor_installation() { trap cleanup_all INT TERM EXIT -# only wget if $IMAGE is older than a week (60*24*7=10080) +# only download if $IMAGE is older than a week (60*24*7=10080) if test $(find $IMAGE -mmin +10080) ; then rm $IMAGE - wget $IMAGE_URL + curl $IMAGE_URL > $IMAGE fi sudo mkdir -p $IMAGE_MNT -mount -o loop $IMAGE $IMAGE_MNT +sudo mount -o loop $IMAGE $IMAGE_MNT bootstrap monitor_installation diff --git a/etc/sudoers.d/jenkins b/etc/sudoers.d/jenkins index 3263e2e7..37145e71 100755 --- 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 --one-file-system /chroots/*, NOPASSWD: /bin/umount -l /chroots/*, NOPASSWD: /usr/bin/du *, NOPASSWD: /bin/kill -9 *, NOPASSWD: /usr/bin/qemu-system-x86_64 *, NOPASSWD: /bin/mkdir -p /media/*, SETENV: NOPASSWD: /usr/sbin/pbuilder * +jenkins ALL= NOPASSWD: /usr/sbin/debootstrap *, NOPASSWD: /usr/sbin/chroot /chroots/*, NOPASSWD: /bin/rm -rf --one-file-system /chroots/*, NOPASSWD: /bin/umount -l /chroots/*, NOPASSWD: /bin/umount /media/*, /bin/mount -o loop *, NOPASSWD: /usr/bin/du *, NOPASSWD: /bin/kill -9 *, NOPASSWD: /usr/bin/qemu-system-x86_64 *, NOPASSWD: /bin/mkdir -p /media/*, SETENV: NOPASSWD: /usr/sbin/pbuilder * # keep these environment variables Defaults env_keep += "http_proxy", env_reset |