diff options
author | Eren ATAS <eatas.contractor@libertyglobal.com> | 2020-06-25 15:08:04 +0200 |
---|---|---|
committer | Eren ATAS <eatas.contractor@libertyglobal.com> | 2020-07-07 11:32:51 +0200 |
commit | 2e84bdf5b61743759d0d1ba5a5e85dda29bf58bf (patch) | |
tree | 1b8c95847f6f49bf80449e203b77cc52b32f1f8c /jenkins_jobs | |
parent | 28e43831e9facb5bdd1169f3af845aad5bf0c717 (diff) | |
download | python-jenkins-job-builder-2e84bdf5b61743759d0d1ba5a5e85dda29bf58bf.tar.gz python-jenkins-job-builder-2e84bdf5b61743759d0d1ba5a5e85dda29bf58bf.tar.xz python-jenkins-job-builder-2e84bdf5b61743759d0d1ba5a5e85dda29bf58bf.zip |
Removed the unnecessary empty combinationFilter Tag
In the current implementation, jjb creates an empty
combinationFilter tag whenever there is `executionStrategy`.
This empty tag should not appear.
Change-Id: I2bf25ae58d12904ce0a00e0a5cfefbf27d9451ad
Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
Diffstat (limited to 'jenkins_jobs')
-rw-r--r-- | jenkins_jobs/modules/project_matrix.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jenkins_jobs/modules/project_matrix.py b/jenkins_jobs/modules/project_matrix.py index ebd566f5..01bc431d 100644 --- a/jenkins_jobs/modules/project_matrix.py +++ b/jenkins_jobs/modules/project_matrix.py @@ -162,9 +162,10 @@ class Matrix(jenkins_jobs.modules.base.Base): strategy = data.get(strategy_name, {}) if strategy_name == "execution-strategy": - XML.SubElement(root, "combinationFilter").text = str( - strategy.get("combination-filter", "") - ).rstrip() + if "combination-filter" in strategy: + XML.SubElement(root, "combinationFilter").text = str( + strategy.get("combination-filter", "") + ).rstrip() XML.SubElement(ex_r, "runSequentially").text = str( strategy.get("sequential", False) ).lower() |