~jibel/unity/utah-jenkins-jobtimeout

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This is based on the default Utah preseed file
# Additions are specific to get a desktop working and autopilot etc.
# This is the minimal preseed that worked on 8 precise ISOs
# Further version-specific tweaks may be necessary or desirable in the future

d-i debian-installer/locale string en_US.UTF-8
#d-i netcfg/get_hostname string unity-ap
d-i partman-auto/method string regular
#need this for desktop
d-i partman/choose_partition select Finish partitioning and write changes to disk
#need this for cobbler
d-i partman/confirm boolean true
#need this for non-desktop
d-i partman/confirm_nooverwrite boolean true
d-i time/zone string Etc/UTC
d-i passwd/user-fullname string Jenkins
d-i passwd/username string jenkins
d-i passwd/user-password password ubuntu
d-i passwd/user-password-again password ubuntu

# -- Packages etc.
# us.archive.ubuntu.com seems to give us issues sometimes, lets try with just
# archive.ubuntu.com
d-i mirror/country string manual
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
# d-i apt-setup/restricted boolean true
d-i apt-setup/universe boolean true

# I hope that this will enable the 'restricted drivers'
#d-i hw-detect/load_firmware boolean true

#need this for non-desktop
d-i finish-install/reboot_in_progress note
# Late commands, auto-login etc.

# For now dist-upgrade to try and ensure staging is in place.
d-i preseed/late_command string \
    echo autologin-user=jenkins >> /target/etc/lightdm/lightdm.conf;\
    in-target apt-add-repository -y ppa:ubuntu-unity/daily-build;\
    in-target apt-get update;\
    in-target apt-get install -y unity-autopilot python-autopilot python-compizconfig \
              openssh-server python-yaml bzr git gdebi-core \
              python-xlib python-testtools recordmydesktop inotify-tools \
              python-setuptools python-support python-testscenarios ibus-pinyin ibus-hangul \
              ibus-anthy python-pydot apport-retrace \
              python-faulthandler \
              gir1.2-gconf-2.0 gir1.2-ibus-1.0 gir1.2-ibus-1.0 \
              mesa-utils \
              libdconf-dbg libdconf-dbus-1-dbg xserver-xorg-core-dbg libdrm2-dbg libgl1-mesa-dri-dbg  libgl1-mesa-glx-dbg;\
    in-target su jenkins -c "mkdir -p /home/jenkins/utah_ap_stuff";\
    echo Installer kernel: $(uname -r) >> /target/home/jenkins/installer_log.log;\
    in-target /bin/bash -c "echo In target kernel: $(uname -r) >> /home/jenkins/installer_log.log";\
    in-target su jenkins -c "bzr checkout lp:~autopilot/unity/utah-jenkins /home/jenkins/utah_ap_stuff";\
    in-target /bin/bash /home/jenkins/utah_ap_stuff/resources/lp_1073202_workaround.sh;\
    in-target /bin/bash /home/jenkins/utah_ap_stuff/resources/setup_sudoers.sh;\
    in-target /bin/bash /home/jenkins/utah_ap_stuff/resources/maybe_install_nvidia_driver.sh;\
    in-target mv /home/jenkins/utah_ap_stuff/resources/logged_in_flag_creator.desktop /etc/xdg/autostart/;\
    in-target mv /home/jenkins/utah_ap_stuff/resources/start_autopilot_tests.sh /usr/local/bin/;\
    in-target mv /home/jenkins/utah_ap_stuff/resources/wait_for_unity.py /usr/local/bin/;\
    in-target mv /home/jenkins/utah_ap_stuff/resources/detect_additional_packages /usr/local/bin/;\
    in-target mv /home/jenkins/utah_ap_stuff/resources/setup_monitors.sh /usr/local/bin/setup_monitors.sh;\
    in-target chmod +x /usr/local/bin/start_autopilot_tests.sh;\
    in-target chmod +x /usr/local/bin/wait_for_unity.py;\
    in-target chmod +x /usr/local/bin/detect_additional_packages;\
    in-target sed -i s/report_crashes=true/report_crashes=false/ /etc/default/whoopsie;\
    in-target apt-get -y dist-upgrade;\
    in-target /bin/bash -c "echo After dist-upgrade: $(uname -r) >> /home/jenkins/installer_log.log";\
    cp /var/log/syslog /target/home/jenkins/install-syslog.log || true