From 7306065d3cacc3265ae13a0f2e77e48b4fd2251c Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 28 Mar 2013 11:59:57 -0700 Subject: [PATCH] Fix mirror build jobs. The job name matched the python27 functions regex, but as a post job, it has no change/branch object. Make the function safe for post jobs. Configure them to also be triggerable by zuul (the timer still works because all zuul variables are ignored). Configure them to not run concurrently (there's only one matching executor so it shouldn't be a problem, but be explicit) since they share an output location. Change-Id: I210da46bac1a8fa5ac9a931f07f189b3734b2ab0 Reviewed-on: https://review.openstack.org/25646 Reviewed-by: Jeremy Stanley Reviewed-by: Clark Boylan Approved: James E. Blair Tested-by: Jenkins --- .../files/jenkins_job_builder/config/mirror.yaml | 4 ++++ modules/openstack_project/files/zuul/openstack_functions.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/openstack_project/files/jenkins_job_builder/config/mirror.yaml b/modules/openstack_project/files/jenkins_job_builder/config/mirror.yaml index ac6cb05236..181179758a 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/mirror.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/mirror.yaml @@ -1,9 +1,11 @@ - job: name: 'periodic-mirror-python26' node: mirror26 + concurrent: false triggers: - timed: '4 21 * * *' + - zuul builders: - shell: | @@ -20,9 +22,11 @@ - job: name: 'periodic-mirror-python27' node: mirror27 + concurrent: false triggers: - timed: '12 21 * * *' + - zuul builders: - shell: | diff --git a/modules/openstack_project/files/zuul/openstack_functions.py b/modules/openstack_project/files/zuul/openstack_functions.py index 6692026770..b2e0c2b076 100644 --- a/modules/openstack_project/files/zuul/openstack_functions.py +++ b/modules/openstack_project/files/zuul/openstack_functions.py @@ -3,5 +3,6 @@ def devstack_params(change, params): params['NODE_LABEL'] = 'devstack-oneiric' def python27_params(change, params): - if change.branch == 'stable/diablo': + if (hasattr(change, 'branch') and + change.branch == 'stable/diablo'): params['NODE_LABEL'] = 'oneiric'