← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Colin Watson has proposed merging lp:~cjwatson/launchpad-buildd/snap-proxy-allow-build into lp:launchpad-buildd.

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

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/snap-proxy-allow-build/+merge/310050

As discussed at the devices sprint.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad-buildd/snap-proxy-allow-build into lp:launchpad-buildd.
=== modified file 'buildsnap'
--- buildsnap	2016-09-16 10:43:09 +0000
+++ buildsnap	2016-11-04 10:53:13 +0000
@@ -136,8 +136,12 @@
     def build(self):
         """Run all build, stage and snap phases."""
         print("Running build phase...")
+        env = {}
+        if self.options.proxy_url:
+            env["http_proxy"] = self.options.proxy_url
+            env["https_proxy"] = self.options.proxy_url
         self.run_build_command(
-            ["snapcraft"], path=os.path.join("/build", self.name))
+            ["snapcraft"], path=os.path.join("/build", self.name), env=env)
 
     def revoke_token(self):
         """Revoke builder proxy token."""

=== modified file 'debian/changelog'
--- debian/changelog	2016-09-16 16:40:39 +0000
+++ debian/changelog	2016-11-04 10:53:13 +0000
@@ -1,3 +1,10 @@
+launchpad-buildd (141) UNRELEASED; urgency=medium
+
+  * buildsnap: Grant access to the proxy during the build phase as well as
+    during the pull phase.
+
+ -- Colin Watson <cjwatson@xxxxxxxxxx>  Fri, 04 Nov 2016 10:47:41 +0000
+
 launchpad-buildd (140) trusty; urgency=medium
 
   * buildsnap: Catch urllib2.URLError as well as urllib2.HTTPError when