Merge lp:~fginther/vmbuilder/jenkins_kvm-add-git-for-maas into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm

Proposed by Francis Ginther
Status: Merged
Merged at revision: 813
Proposed branch: lp:~fginther/vmbuilder/jenkins_kvm-add-git-for-maas
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 67 lines (+11/-2)
5 files modified
config/cloud-maasv2.cfg (+1/-0)
config/cloud-maasv3.cfg (+1/-0)
config/cloud-trusty-pp64el.cfg (+1/-0)
templates/img-maasv2.tmpl (+4/-1)
templates/img-maasv3.tmpl (+4/-1)
To merge this branch: bzr merge lp:~fginther/vmbuilder/jenkins_kvm-add-git-for-maas
Reviewer Review Type Date Requested Status
Philip Roche (community) Approve
Robert C Jennings (community) Approve
Review via email: mp+357844@code.launchpad.net

Commit message

Add 'git' to the build environment for maas images

The maas branches have moved from bzr to git and we therefore need
git to be available.

Description of the change

I've tested this in the maasv2 jobs here: https://cloud-images-jenkins.canonical.com/job/MAAS_v2_MasterBuilder/1391/

Note the use of the http.proxy. It's needed for the ppc64el builds, but it causes the other arches to fail. I chose to use the proxy method first as it will fail quickly and then retry without it. Otherwise, git will wait for 2 minutes before timing out the non-proxy method.

To post a comment you must log in.
Revision history for this message
Robert C Jennings (rcj) wrote :

+1

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

+1 on the fallback approach too

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config/cloud-maasv2.cfg'
2--- config/cloud-maasv2.cfg 2015-08-31 19:06:51 +0000
3+++ config/cloud-maasv2.cfg 2018-10-25 21:56:02 +0000
4@@ -4,6 +4,7 @@
5 password: ubuntu
6 packages:
7 - bzr
8+- git
9 - qemu-utils
10 - zerofree
11 - gdisk
12
13=== modified file 'config/cloud-maasv3.cfg'
14--- config/cloud-maasv3.cfg 2016-10-03 20:23:12 +0000
15+++ config/cloud-maasv3.cfg 2018-10-25 21:56:02 +0000
16@@ -4,6 +4,7 @@
17 password: ubuntu
18 packages:
19 - bzr
20+- git
21 - qemu-utils
22 - zerofree
23 - gdisk
24
25=== modified file 'config/cloud-trusty-pp64el.cfg'
26--- config/cloud-trusty-pp64el.cfg 2015-04-03 14:37:41 +0000
27+++ config/cloud-trusty-pp64el.cfg 2018-10-25 21:56:02 +0000
28@@ -1,6 +1,7 @@
29 #cloud-config
30 packages:
31 - bzr
32+- git
33 - debootstrap
34 - kpartx
35 - debhelper
36
37=== modified file 'templates/img-maasv2.tmpl'
38--- templates/img-maasv2.tmpl 2018-09-24 20:22:02 +0000
39+++ templates/img-maasv2.tmpl 2018-10-25 21:56:02 +0000
40@@ -44,7 +44,10 @@
41 # Set up the code paths
42 cd /tmp
43 echo "Checking out maas-image from git"
44-git clone "${MAAS_GIT_REPO}" "${SRC_D}" ||
45+# Try the proxy method first, then fallback to using no proxy
46+# Either way will work, but this will failover faster
47+git clone --config "http.proxy=squid.internal:3128" "${MAAS_GIT_REPO}" "${SRC_D}" ||
48+ git clone "${MAAS_GIT_REPO}" "${SRC_D}" ||
49 fail "Failed to check out the GIT branch"
50
51 # Assume we are MAAS v1
52
53=== modified file 'templates/img-maasv3.tmpl'
54--- templates/img-maasv3.tmpl 2018-09-24 20:22:02 +0000
55+++ templates/img-maasv3.tmpl 2018-10-25 21:56:02 +0000
56@@ -40,7 +40,10 @@
57 # Set up the code paths
58 cd /tmp
59 echo "Checking out maas-image from git"
60-git clone "${MAAS_GIT_REPO}" "${SRC_D}" ||
61+# Try the proxy method first, then fallback to using no proxy
62+# Either way will work, but this will failover faster
63+git clone --config "http.proxy=squid.internal:3128" "${MAAS_GIT_REPO}" "${SRC_D}" ||
64+ git clone "${MAAS_GIT_REPO}" "${SRC_D}" ||
65 fail "Failed to check out the GIT branch"
66
67 bash -x "${SRC_D}/system-setup";

Subscribers

People subscribed via source and target branches