diff options
-rwxr-xr-x | bin/g-i-installation.sh | 9 | ||||
-rw-r--r-- | etc/sudoers.d/jenkins | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index 866e02f4..6904e67f 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -355,7 +355,7 @@ monitor_system() { save_logs() { # - # get logs from the installed system + # get logs and other files from the installed system # # remove set +e once the code has proven its good set +e @@ -363,8 +363,15 @@ save_logs() { sudo mkdir -p $SYSTEM_MNT sudo guestmount -o uid=$(id -u) -o gid=$(id -g) -a $NAME.raw -m /dev/debian/root --ro $SYSTEM_MNT || true if [ -d $SYSTEM_MNT/var/log ] ; then + # + # copy logs + # mkdir -p $RESULTS/log cp -r $SYSTEM_MNT/var/log/installer $RESULTS/log/ + # + # get list of installed packages + # + chroot $SYSTEM_MNT dpkg -l > $RESULTS/dpkg-l else echo "Warning: cannot mount installed system to copy the logs..." fi diff --git a/etc/sudoers.d/jenkins b/etc/sudoers.d/jenkins index 12bf7fa4..b77eff5f 100644 --- a/etc/sudoers.d/jenkins +++ b/etc/sudoers.d/jenkins @@ -1,4 +1,4 @@ -jenkins ALL= NOPASSWD: /usr/sbin/debootstrap *, /usr/sbin/chroot /chroots/*, /bin/rm -rf --one-file-system /chroots/*, /bin/umount -l /chroots/*, /bin/umount -l /media/*, /bin/mount -o loop*, /usr/bin/du *, /bin/kill -9 *, /usr/bin/qemu-system-x86_64 *, /bin/mkdir -p /media/*, /usr/bin/guestmount *, SETENV: NOPASSWD: /usr/sbin/pbuilder * +jenkins ALL= NOPASSWD: /usr/sbin/debootstrap *, /usr/sbin/chroot /chroots/*, /usr/sbin/chroot /media/*, /bin/rm -rf --one-file-system /chroots/*, /bin/umount -l /chroots/*, /bin/umount -l /media/*, /bin/mount -o loop*, /usr/bin/du *, /bin/kill -9 *, /usr/bin/qemu-system-x86_64 *, /bin/mkdir -p /media/*, /usr/bin/guestmount *, SETENV: NOPASSWD: /usr/sbin/pbuilder * # keep these environment variables Defaults env_keep += "http_proxy", env_reset |