Hello Thcipriani,

I'd like you to do a code review.  Please visit

    https://gerrit.wikimedia.org/r/374970

to review the following change.


Change subject: debian-glue jobs with BACKPORTS=yes
......................................................................

debian-glue jobs with BACKPORTS=yes

Create alias jobs:
    debian-glue-backports
    debian-glue-backports-non-voting

Have set_parameters() set BACKPORTS=yes for them.

Bug: T173999
Signed-off-by: Tyler Cipriani <[email protected]>
Change-Id: Ic2b8a57fe2b9001cb5e090421910b44e2e4c55c2
---
M jjb/operations-debs.yaml
M tests/test_zuul_parameters.py
M zuul/layout.yaml
M zuul/parameter_functions.py
4 files changed, 31 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/70/374970/1

diff --git a/jjb/operations-debs.yaml b/jjb/operations-debs.yaml
index 7b1496e..0d453f8 100644
--- a/jjb/operations-debs.yaml
+++ b/jjb/operations-debs.yaml
@@ -188,6 +188,22 @@
     # Reinject Zuul parameters since JJB strip them for some reason
     triggers:
      - zuul
+
+# Alias jobs that would have BACKPORTS=yes injected by Zuul
+- job-template:
+    !!merge : *job_template_debian_glue
+    name: 'debian-glue-backports'
+    # Reinject Zuul parameters since JJB strip them for some reason
+    triggers:
+     - zuul
+
+- job-template:
+    !!merge : *job_template_debian_glue
+    name: 'debian-glue-backports-non-voting'
+    # Reinject Zuul parameters since JJB strip them for some reason
+    triggers:
+     - zuul
+
 #
 # PROJECTS
 #
diff --git a/tests/test_zuul_parameters.py b/tests/test_zuul_parameters.py
index f770f7e..7ce1dab 100644
--- a/tests/test_zuul_parameters.py
+++ b/tests/test_zuul_parameters.py
@@ -25,6 +25,18 @@
         set_parameters(None, job, params)
         self.assertIn('PBUILDER_USENETWORK', params)
 
+    def test_debian_glue_backports(self):
+        # Zuul injects BACKPORTS=yes - T173999
+        for job_name in (
+                'debian-glue-backports',
+                'debian-glue-backports-non-voting',
+                ):
+            job = FakeJob(job_name)
+            params = {'ZUUL_PROJECT': 'fake_project'}
+            set_parameters(None, job, params)
+            self.assertIn('BACKPORTS', params)
+            self.assertEquals('yes', params['BACKPORTS'])
+
     def test_mw_testskin_parameters(self):
         for job_name in ['mw-testskin', 'mw-testskin-non-voting']:
             job = FakeJob(job_name)
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 57d41b8..00a9255 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -736,7 +736,7 @@
 
   # Experimental building of Debian packages
   # based on jenkins-debian-glue
-  - name: ^debian-glue(-non-voting)?$
+  - name: ^debian-glue.*
     # Point directly to artifacts
     success-pattern: 
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/'
     # FIXME maybe restrict just to debian/ changes:
diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 3725488..0c19cfd 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -106,6 +106,8 @@
         nodepool_params(item, job, params)
 
     if 'debian-glue' in job.name:
+        if 'backports' in job.name:  # T173999
+            params['BACKPORTS'] = 'yes'
         # Always set the value to be safe (T144094)
         params['BUILD_TIMEOUT'] = 30  # minutes
         # Finely tweak jenkins-debian-glue parameters

-- 
To view, visit https://gerrit.wikimedia.org/r/374970
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2b8a57fe2b9001cb5e090421910b44e2e4c55c2
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Thcipriani <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to