Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/300564
Change subject: debian-glue: pass PBUILDER_USENETWORK for Zuul
......................................................................
debian-glue: pass PBUILDER_USENETWORK for Zuul
integration/zuul packaging uses dh_virtualenv which fetch dependencies
from pypi.python.org. We thus have to tell pbuilderrc to enable
network.
jenkins-debian-glue injects USENETWORK dynamically granted
PBUILDER_USENETWORK is set.
Change-Id: If7129833fa9075947a79a23a06d309b6761a5373
---
A tests/test_zuul_parameters.py
M zuul/parameter_functions.py
2 files changed, 32 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/integration/config
refs/changes/64/300564/1
diff --git a/tests/test_zuul_parameters.py b/tests/test_zuul_parameters.py
new file mode 100644
index 0000000..3fb60b2
--- /dev/null
+++ b/tests/test_zuul_parameters.py
@@ -0,0 +1,26 @@
+import os
+import unittest
+
+from fakes import FakeJob
+
+set_parameters = None # defined for flake8
+
+# Import function
+execfile(os.path.join(
+ os.path.dirname(os.path.abspath(__file__)),
+ '../zuul/parameter_functions.py'))
+
+
+class TestZuulSetParameters(unittest.TestCase):
+
+ def test_debian_glue_default_to_no_network(self):
+ job = FakeJob('debian-glue')
+ params = {'ZUUL_PROJECT': 'some/project'}
+ set_parameters(None, job, params)
+ self.assertNotIn('PBUILDER_USENETWORK', params)
+
+ def test_zuul_debian_glue_with_network(self):
+ job = FakeJob('debian-glue')
+ params = {'ZUUL_PROJECT': 'integration/zuul'}
+ set_parameters(None, job, params)
+ self.assertIn('PBUILDER_USENETWORK', params)
diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 3df1c6b..938d74d 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -66,6 +66,12 @@
if job.name.endswith('-publish'):
set_doc_variables(item, job, params)
+ if 'debian-glue' in job.name:
+ # Finely tweak jenkins-debian-glue parameters
+ if params['ZUUL_PROJECT'] == 'integration/zuul':
+ # Uses dh_virtualenv which needs access to pypy.python.org
+ params['PBUILDER_USENETWORK'] = 'yes'
+
dependencies = {
'AbuseFilter': ['AntiSpoof'],
'ApiFeatureUsage': ['Elastica'],
--
To view, visit https://gerrit.wikimedia.org/r/300564
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If7129833fa9075947a79a23a06d309b6761a5373
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits