Merge lp:~fginther/vmbuilder/new-artful-builder into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm

Proposed by Francis Ginther
Status: Merged
Merged at revision: 793
Proposed branch: lp:~fginther/vmbuilder/new-artful-builder
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 139 lines (+46/-46)
2 files modified
jenkins/CloudImages_Update_Builder.sh (+7/-2)
templates/img-update.tmpl (+39/-44)
To merge this branch: bzr merge lp:~fginther/vmbuilder/new-artful-builder
Reviewer Review Type Date Requested Status
Dan Watkins (community) Approve
Philip Roche Approve
Chris Glass (community) Approve
Review via email: mp+332487@code.launchpad.net

Commit message

Update source image and package set for artful. Dropping packages that no longer exist.

Description of the change

Update source image and package set for artful. Dropping packages that no longer exist.

This was used to build a new artful builder on jerff [1] which was then used to build a 17.10 Oracle Compute image [2]

[1] - https://cloud-images-jenkins.canonical.com/job/Update_Builder_Image/91/
[2] - https://cloud-images-jenkins.canonical.com/job/CloudImages_SmallCPC_Base/4753/

To post a comment you must log in.
Revision history for this message
Dan Watkins (oddbloke) wrote :

Couple of inline comments, but broadly speaking I like this a lot.

review: Needs Fixing
794. By Francis Ginther

Restore proper builder setup for zesty and build anything newer with artful.

Revision history for this message
Dan Watkins (oddbloke) wrote :

One last comment inline.

review: Needs Fixing
Revision history for this message
Chris Glass (tribaal) wrote :

Looks good! nitpicks inline.

+1

review: Approve
795. By Francis Ginther

Use zesty to build zesty and unify indentation over the code being modified.

Revision history for this message
Philip Roche (philroche) wrote :

+1

review: Approve
Revision history for this message
Dan Watkins (oddbloke) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jenkins/CloudImages_Update_Builder.sh'
2--- jenkins/CloudImages_Update_Builder.sh 2016-08-03 10:33:46 +0000
3+++ jenkins/CloudImages_Update_Builder.sh 2017-10-26 19:37:10 +0000
4@@ -18,13 +18,18 @@
5
6 # Copy the target disk image
7 case ${SUITE} in
8- precise|trusty|wily|xenial)
9+ trusty|xenial)
10 disk_orig="${SUITE}-server-cloudimg-${ARCH}-disk1.img"
11 builder_img=/srv/builder/images/trusty-builder-latest.img
12 ;;
13+ zesty)
14+ # Zesty needs yakkety or newer due to ext4 tool changes
15+ disk_orig="${SUITE}-server-cloudimg-${ARCH}.img"
16+ builder_img=/srv/builder/images/zesty-builder-latest.img
17+ ;;
18 *)
19 disk_orig="${SUITE}-server-cloudimg-${ARCH}.img"
20- builder_img=/srv/builder/images/yakkety-builder-latest.img
21+ builder_img=/srv/builder/images/artful-builder-latest.img
22 ;;
23 esac
24
25
26=== modified file 'templates/img-update.tmpl'
27--- templates/img-update.tmpl 2017-10-10 22:34:03 +0000
28+++ templates/img-update.tmpl 2017-10-26 19:37:10 +0000
29@@ -44,14 +44,6 @@
30
31 [ "${dev_uuid}" == "${odev_uuid}" ] && fail "device ID's are the same. This is bad"
32
33-# dist_ge(dist1,dist2)
34-# return true if dist1 is newer or the same as dist2
35-dist_ge() { [[ "$1" > "$2" || "$1" == "$2" ]]; }
36-
37-# dist_ge(dist1,dist2)
38-# return true if dist2 is older than or the same as dist2
39-dist_le() { [[ "$1" < "$2" || "$1" == "$2" ]]; }
40-
41 operation_files() {
42
43 for i in $(seq 0 $((${#file_list[@]} - 1)))
44@@ -210,28 +202,29 @@
45 dkms
46 git)
47
48-if [ "${suite}" == "precise" ]; then
49- pkgs+=(linux-source-3.2.0 qemu-kvm-extras qemu-kvm-extras-static)
50-else
51- case "${suite}" in
52- trusty|xenial) # not for yakkety onward
53- xchroot apt-add-repository -y ppa:snappy-dev/tools
54- xchroot apt-add-repository -y ppa:ubuntu-sdk-team/ppa
55- ;;
56- esac
57- xchroot apt-add-repository -y multiverse
58- pkgs+=(qemu-user-static
59- qemu-user
60- ubuntu-device-flash
61- ubuntu-snappy-cli
62- python-openstackclient
63- cloud-utils)
64- case "${suite}" in
65- trusty|xenial)
66- pkgs+=(ubuntu-core-security-utils)
67- ;;
68- esac
69-fi
70+case "${suite}" in
71+ trusty|xenial) # not for yakkety onward
72+ xchroot apt-add-repository -y ppa:snappy-dev/tools
73+ xchroot apt-add-repository -y ppa:ubuntu-sdk-team/ppa
74+ ;;
75+esac
76+xchroot apt-add-repository -y multiverse
77+pkgs+=(qemu-user-static
78+ qemu-user
79+ ubuntu-snappy-cli
80+ python-openstackclient
81+ cloud-utils)
82+case "${suite}" in
83+ trusty|xenial)
84+ pkgs+=(ubuntu-core-security-utils)
85+ ;;
86+esac
87+# ubuntu-device-flash was dropped after zesty
88+case "${suite}" in
89+ trusty|xenial|zesty)
90+ pkgs+=(ubuntu-device-flash)
91+ ;;
92+esac
93
94 # Installation of packages
95 debug "Performing package operations"
96@@ -241,19 +234,21 @@
97 debug "Package operations complete"
98
99 # Install ZFS
100-if dist_ge ${suite} xenial; then
101- xchroot apt-get -y install zfsutils-linux
102-
103-else
104- debug "Installing ZFS"
105- xchroot apt-add-repository -y ppa:zfs-native/stable
106- xchroot apt-get update
107- xchroot apt-get -y install spl
108- xchroot dpkg-reconfigure spl
109- xchroot apt-get -y install ubuntu-zfs
110- xchroot dpkg-reconfigure dkms
111- debug "Installed ZFS"
112-fi
113+case "${suite}" in
114+ trusty)
115+ debug "Installing ZFS"
116+ xchroot apt-add-repository -y ppa:zfs-native/stable
117+ xchroot apt-get update
118+ xchroot apt-get -y install spl
119+ xchroot dpkg-reconfigure spl
120+ xchroot apt-get -y install ubuntu-zfs
121+ xchroot dpkg-reconfigure dkms
122+ debug "Installed ZFS"
123+ ;;
124+ *)
125+ xchroot apt-get -y install zfsutils-linux
126+ ;;
127+esac
128
129 # Modify boot settings
130 debug "Modifying in-image settings for builder"
131@@ -264,7 +259,7 @@
132 xchroot update-initramfs -u -k all
133 # On yakkety and later, reinstall grub-pc which is no longer in the base image
134 case $suite in
135- precise|trusty|xenial)
136+ trusty|xenial)
137 xchroot dpkg-reconfigure grub-pc
138 ;;
139 *)

Subscribers

People subscribed via source and target branches