diff options
author | Holger Levsen <holger@layer-acht.org> | 2012-12-02 03:15:55 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2012-12-02 03:15:55 +0100 |
commit | 687c2bdb601633419f12f3a7382fa631d5d2233d (patch) | |
tree | 40348b2a4009cf207537310f114d931afd3d2cc7 | |
parent | a89a10b0444f1e5e07200193d3930ae780370fe5 (diff) | |
download | jenkins.debian.net-687c2bdb601633419f12f3a7382fa631d5d2233d.tar.xz |
fixup: implement basics for cd tests
-rw-r--r-- | TODO | 1 | ||||
-rwxr-xr-x | bin/cd_tester.sh | 10 | ||||
-rwxr-xr-x | etc/sudoers.d/jenkins | 2 | ||||
-rw-r--r-- | job-cfg/cd-test.yaml | 2 |
4 files changed, 10 insertions, 5 deletions
@@ -73,6 +73,7 @@ See link:http://jenkins.debian.net/userContent/about.html["about jenkins.debian. * NIH: ** weekly edu +** $IMAGE is in results ** script $4 qcow image size= ** edu-wheezy-preseed.base -> sed .cfg (LANG) *** pick LANG from predefined list at random diff --git a/bin/cd_tester.sh b/bin/cd_tester.sh index 89c89ddc..4860683a 100755 --- a/bin/cd_tester.sh +++ b/bin/cd_tester.sh @@ -45,7 +45,7 @@ cleanup_all() { # cleanup # umount $IMAGE_MNT - sudo rm $IMAGE $NAME.qcow + sudo rm $NAME.qcow # # create video # @@ -90,8 +90,12 @@ monitor_installation() { trap cleanup_all INT TERM EXIT -wget $IMAGE_URL -mkdir -p $IMAGE_MNT +# only wget if $IMAGE is older than a week (60*24*7=10080) +if test $(find $IMAGE -mmin +10080) ; then + rm $IMAGE + wget $IMAGE_URL +fi +sudo mkdir -p $IMAGE_MNT mount -o loop $IMAGE $IMAGE_MNT bootstrap monitor_installation diff --git a/etc/sudoers.d/jenkins b/etc/sudoers.d/jenkins index ee21a76b..3263e2e7 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 *, 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: /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 diff --git a/job-cfg/cd-test.yaml b/job-cfg/cd-test.yaml index 79223b9f..407e9697 100644 --- a/job-cfg/cd-test.yaml +++ b/job-cfg/cd-test.yaml @@ -10,7 +10,7 @@ triggers: - timed: "{my_timed}" builders: - - shell: "'{my_shell}'" + - shell: "{my_shell}" publishers: - logparser: rulespath: '/srv/jenkins/logparse/debian.rules' |