summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/cd_tester.sh16
-rwxr-xr-xetc/sudoers.d/jenkins2
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