From 58c51178b3e161028613836069772d94e10ce0e6 Mon Sep 17 00:00:00 2001 From: Aigars Mahinovs Date: Mon, 13 Aug 2018 12:39:58 +0200 Subject: [PATCH] Avoid extra XML elements in views Non-view modules get called and add empty "actions", "builders" and other XML elements to view XML tags where they are not supposed to be, this causes Jenkins "Old data" warnings Change-Id: Ie031192dca7ac0920e0953d533ed15c22db91022 Story: 2002159 Task: 20008 --- jenkins_jobs/xml_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jenkins_jobs/xml_config.py b/jenkins_jobs/xml_config.py index c9aa7c0be..c6265d6f9 100644 --- a/jenkins_jobs/xml_config.py +++ b/jenkins_jobs/xml_config.py @@ -90,7 +90,8 @@ class XmlGenerator(object): Mod = ep.load() mod = Mod(self.registry) xml = mod.root_xml(data) - self._gen_xml(xml, data) + if "view-type" not in data: + self._gen_xml(xml, data) obj = XmlJob(xml, data['name']) return obj