Merge lp:~rcj/vmbuilder/jenkins_kvm into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm

Proposed by Robert C Jennings on 2018-09-24
Status: Merged
Merged at revision: 809
Proposed branch: lp:~rcj/vmbuilder/jenkins_kvm
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 194 lines (+25/-19)
8 files modified
jenkins/MAAS_Builder.sh (+3/-2)
jenkins/MAASv2_Builder.sh (+2/-2)
jenkins/MAASv2_Cleaner.sh (+1/-1)
jenkins/MAASv3_Builder.sh (+2/-2)
maas_config.sh (+4/-4)
templates/img-maas.tmpl (+5/-3)
templates/img-maasv2.tmpl (+4/-2)
templates/img-maasv3.tmpl (+4/-3)
To merge this branch: bzr merge lp:~rcj/vmbuilder/jenkins_kvm
Reviewer Review Type Date Requested Status
Francis Ginther 2018-09-24 Approve on 2018-09-24
Dan Watkins 2018-09-24 Approve on 2018-09-24
Review via email: mp+355558@code.launchpad.net

Commit message

maas-image: move from bzr to git

To post a comment you must log in.
Robert C Jennings (rcj) wrote :

Callers updated to provide MAAS_GIT_BRANCH alongside BRANCH/MAAS_BRANCH env variables during the transition.

review: Needs Information
Dan Watkins (daniel-thewatkins) wrote :

Added some further inline questions.

Francis Ginther (fginther) wrote :

I'm with Dan, do we need to support anything other then git at this point?

Robert C Jennings (rcj) wrote :

All comments addressed in r810.

review: Approve
Francis Ginther (fginther) wrote :

Approve

review: Approve
lp:~rcj/vmbuilder/jenkins_kvm updated on 2018-09-24
809. By Robert C Jennings on 2018-09-24

Merge lp:~rcj/vmbuilder/jenkins_kvm into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm [a=rcj] [r=daniel-thewatkins,fginther]

maas-image: move from bzr to git

MP: https://code.launchpad.net/~rcj/vmbuilder/jenkins_kvm/+merge/355558

Scott Moser (smoser) wrote :

This didn't seem to work correctly.

Please see my suggested fix at
 https://code.launchpad.net/~smoser/vmbuilder/jenkins_kvm.img-maas-git/+merge/357841

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jenkins/MAAS_Builder.sh'
2--- jenkins/MAAS_Builder.sh 2014-07-01 21:49:53 +0000
3+++ jenkins/MAAS_Builder.sh 2018-09-24 20:22:33 +0000
4@@ -27,7 +27,7 @@
5 base_name="${SUITE}-server-cloudimg"
6 rel_base_name="ubuntu-$(ubuntu-adj2version ${SUITE})-${stream//-/}-server-cloudimg"
7
8-export maas_branch="${MAAS_BRANCH:-http://bazaar.launchpad.net/~smoser/maas/maas.ubuntu.com.images-ephemeral}"
9+export maas_git_repo="${MAAS_GIT_REPO:-lp:~maas-images-maintainers/maas-images}"
10
11 case "${STREAM}" in
12 release) build_f="/srv/ec2-images/releases/${SUITE}/release-${SERIAL}";
13@@ -150,7 +150,8 @@
14
15 # Generate the Query2 tree
16 src_tree="${WORKSPACE}/maas_src"
17-bzr branch "${maas_branch}" "${src_tree}"
18+echo "Checking out maas-image from git"
19+git clone "${maas_git_repo}" "${src_tree}"
20 ${src_tree}/tree2query \
21 --commit-msg "Build ${BUILD_ID}" \
22 --namespace maas \
23
24=== modified file 'jenkins/MAASv2_Builder.sh'
25--- jenkins/MAASv2_Builder.sh 2018-07-02 20:49:52 +0000
26+++ jenkins/MAASv2_Builder.sh 2018-09-24 20:22:33 +0000
27@@ -29,7 +29,7 @@
28 rel_base_name="ubuntu-${VERSION:-$(ubuntu-adj2version ${SUITE})}-${stream//-/}-server-cloudimg"
29
30 export maas_branch_v1="http://bazaar.launchpad.net/~smoser/maas/maas.ubuntu.com.images-ephemeral"
31-export maas_branch="${MAAS_BRANCH:-$maas_branch_v1}"
32+export maas_git_repo="${MAAS_GIT_REPO:-lp:~maas-images-maintainers/maas-images}"
33
34 case "${STREAM}" in
35 release) build_f="/srv/ec2-images/releases/${SUITE}/release-${SERIAL}";
36@@ -89,7 +89,7 @@
37 --local "${build_f}" \
38 --serial "${SERIAL}" \
39 --out "${out_f}" \
40- --maas-branch "${maas_branch}" \
41+ --maas-git-repo "${maas_git_repo}" \
42 --out_d "${out_d}" ||
43 fail "Failed to configure KVM instance for building"
44 set +x
45
46=== modified file 'jenkins/MAASv2_Cleaner.sh'
47--- jenkins/MAASv2_Cleaner.sh 2018-09-17 13:04:30 +0000
48+++ jenkins/MAASv2_Cleaner.sh 2018-09-24 20:22:33 +0000
49@@ -22,7 +22,7 @@
50 sstreams=${WORKSPACE}/sstreams
51 maasv2=${WORKSPACE}/maasv2
52 check_repo ${GIT_SIMPLESTREAMS:-lp:simplestreams} ${sstreams}
53-check_branch ${BZR_MAASv2:-lp:maas-images} ${maasv2}
54+check_repo ${MAAS_GIT_REPO:-lp:~maas-images-maintainers/maas-images} ${maasv2}
55
56 for METADATA_ROOT in /srv/maas-images/ephemeral-v2/daily/ \
57 /srv/maas-images/ephemeral-v3/daily/; do
58
59=== modified file 'jenkins/MAASv3_Builder.sh'
60--- jenkins/MAASv3_Builder.sh 2018-07-02 20:49:52 +0000
61+++ jenkins/MAASv3_Builder.sh 2018-09-24 20:22:33 +0000
62@@ -28,7 +28,7 @@
63 out_f="${WORKSPACE:?}/maas-${SUITE}-${STREAM}-config.sh"
64 raw_f="${WORKSPACE}/${SUITE}-output.raw"
65
66-export maas_branch="${MAAS_BRANCH:?}"
67+export maas_git_repo="${MAAS_GIT_REPO:?}"
68
69 touch ${WORKSPACE}/maasv3
70 tar cvf ${query_t} ${WORKSPACE}/maasv3
71@@ -42,7 +42,7 @@
72 --local "${build_f}" \
73 --serial "${SERIAL}" \
74 --out "${out_f}" \
75- --maas-branch "${maas_branch}" \
76+ --maas-git-repo "${maas_git_repo}" \
77 --out_d "/tmp/maas_final" ||
78 fail "Failed to configure KVM instance for building"
79
80
81=== modified file 'maas_config.sh'
82--- maas_config.sh 2014-04-10 22:21:31 +0000
83+++ maas_config.sh 2018-09-24 20:22:33 +0000
84@@ -19,7 +19,7 @@
85 --out_d Where to stuff the output files
86
87 Optional:
88- --maas-branch bzr branch for maas image code
89+ --maas-git-repo git repo for maas image code
90 EOM
91 }
92
93@@ -27,7 +27,7 @@
94 fail() { echo "${@}" 2>&1; exit 1;}
95
96 serial="${serial:-$(date +%Y%m%d)}"
97-maas_branch="${maas_branch:-http://bazaar.launchpad.net/~smoser/maas/maas.ubuntu.com.images-ephemeral}"
98+maas_git_repo="${maas_git_repo:-lp:~maas-images-maintainers/maas-images}"
99 template_f="${PWD}/img-maas.tmpl"
100
101 while [ $# -ne 0 ]; do
102@@ -36,7 +36,7 @@
103 --distro) distro=$2; shift;;
104 --stream) stream=$2; shift;;
105 --local) local_d=$2; shift;;
106- --maas-branch) maas_branch=$2; shift;;
107+ --maas-git-repo) maas_git_repo=$2; shift;;
108 --base-name) base_name=$2; shift;;
109 --template) template_f=$2; shift;;
110 --out) out_f=$2; shift;;
111@@ -63,7 +63,7 @@
112
113 sed -e "s,%d,${distro},g" \
114 -e "s,%S,${stream},g" \
115- -e "s,%M,${maas_branch},g" \
116+ -e "s,%M,${maas_git_repo},g" \
117 -e "s,%D,${local_d},g" \
118 -e "s,%B,${base_name},g" \
119 -e "s,%s,${serial},g" \
120
121=== modified file 'templates/img-maas.tmpl'
122--- templates/img-maas.tmpl 2014-11-07 15:49:08 +0000
123+++ templates/img-maas.tmpl 2018-09-24 20:22:33 +0000
124@@ -20,7 +20,7 @@
125
126 # Variables from configuration step
127 PACK_D="%D"
128-BZR_MAAS="%M"
129+MAAS_GIT_REPO="%M"
130 suite="%d"
131 stream="%S"
132 serial="%s"
133@@ -38,8 +38,10 @@
134
135 # Set up the code paths
136 cd /tmp
137-bzr branch "${BZR_MAAS}" "${SRC_D}" ||
138- fail "Failed to check out the BZR branch"
139+echo "Checking out maas-image from git"
140+git clone "${MAAS_GIT_REPO}" "${SRC_D}" ||
141+ fail "Failed to check out the GIT branch"
142+
143 mci2eph="${SRC_D}/maas-cloudimg2ephemeral"
144
145 # Extract /dev/vdc (which has all the goodies including the image
146
147=== modified file 'templates/img-maasv2.tmpl'
148--- templates/img-maasv2.tmpl 2018-07-19 15:41:30 +0000
149+++ templates/img-maasv2.tmpl 2018-09-24 20:22:33 +0000
150@@ -24,6 +24,7 @@
151 # Variables from configuration step
152 PACK_D="%D"
153 BZR_MAAS="%M"
154+MAAS_GIT_REPO="%M"
155 suite="%d"
156 stream="%S"
157 serial="%s"
158@@ -42,8 +43,9 @@
159
160 # Set up the code paths
161 cd /tmp
162-bzr branch "${BZR_MAAS}" "${SRC_D}" ||
163- fail "Failed to check out the BZR branch"
164+echo "Checking out maas-image from git"
165+git clone "${MAAS_GIT_REPO}" "${SRC_D}" ||
166+ fail "Failed to check out the GIT branch"
167
168 # Assume we are MAAS v1
169 MAASv=1
170
171=== modified file 'templates/img-maasv3.tmpl'
172--- templates/img-maasv3.tmpl 2018-07-23 13:14:56 +0000
173+++ templates/img-maasv3.tmpl 2018-09-24 20:22:33 +0000
174@@ -20,7 +20,7 @@
175
176 # Variables from configuration step
177 PACK_D="%D"
178-BZR_MAAS="%M"
179+MAAS_GIT_REPO="%M"
180 suite="%d"
181 stream="%S"
182 serial="%s"
183@@ -39,8 +39,9 @@
184
185 # Set up the code paths
186 cd /tmp
187-bzr branch "${BZR_MAAS}" "${SRC_D}" ||
188- fail "Failed to check out the BZR branch"
189+echo "Checking out maas-image from git"
190+git clone "${MAAS_GIT_REPO}" "${SRC_D}" ||
191+ fail "Failed to check out the GIT branch"
192
193 bash -x "${SRC_D}/system-setup";
194 OUT_D="/tmp/maas_final"

Subscribers

People subscribed via source and target branches