Merge lp:~cjwatson/launchpad-buildd/snap-proxy-allow-build into lp:launchpad-buildd

Proposed by Colin Watson
Status: Merged
Merged at revision: 205
Proposed branch: lp:~cjwatson/launchpad-buildd/snap-proxy-allow-build
Merge into: lp:launchpad-buildd
Diff against target: 32 lines (+12/-1)
2 files modified
buildsnap (+5/-1)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad-buildd/snap-proxy-allow-build
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+310050@code.launchpad.net

Commit message

buildsnap: Grant access to the proxy during the build phase as well as during the pull phase.

Description of the change

As discussed at the devices sprint.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'buildsnap'
2--- buildsnap 2016-09-16 10:43:09 +0000
3+++ buildsnap 2016-11-04 10:53:13 +0000
4@@ -136,8 +136,12 @@
5 def build(self):
6 """Run all build, stage and snap phases."""
7 print("Running build phase...")
8+ env = {}
9+ if self.options.proxy_url:
10+ env["http_proxy"] = self.options.proxy_url
11+ env["https_proxy"] = self.options.proxy_url
12 self.run_build_command(
13- ["snapcraft"], path=os.path.join("/build", self.name))
14+ ["snapcraft"], path=os.path.join("/build", self.name), env=env)
15
16 def revoke_token(self):
17 """Revoke builder proxy token."""
18
19=== modified file 'debian/changelog'
20--- debian/changelog 2016-09-16 16:40:39 +0000
21+++ debian/changelog 2016-11-04 10:53:13 +0000
22@@ -1,3 +1,10 @@
23+launchpad-buildd (141) UNRELEASED; urgency=medium
24+
25+ * buildsnap: Grant access to the proxy during the build phase as well as
26+ during the pull phase.
27+
28+ -- Colin Watson <cjwatson@ubuntu.com> Fri, 04 Nov 2016 10:47:41 +0000
29+
30 launchpad-buildd (140) trusty; urgency=medium
31
32 * buildsnap: Catch urllib2.URLError as well as urllib2.HTTPError when

Subscribers

People subscribed via source and target branches

to all changes: