diff options
author | Zuul <zuul@review.openstack.org> | 2018-06-06 14:45:17 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-06-06 14:45:17 +0000 |
commit | 52d2db498445c20f2d43d674783666424063293c (patch) | |
tree | 842f6ccec26471d56d04965fed552dcc052e6ef0 /jenkins_jobs/config.py | |
parent | 1614f4f992d77fc60f8027f5d861c23cd51ea82a (diff) | |
parent | 75d78b65409632c14577ba0cce74bfe2e6d3765a (diff) | |
download | python-jenkins-job-builder-52d2db498445c20f2d43d674783666424063293c.tar.gz python-jenkins-job-builder-52d2db498445c20f2d43d674783666424063293c.tar.xz python-jenkins-job-builder-52d2db498445c20f2d43d674783666424063293c.zip |
Merge "Add retain_anchors config option."
Diffstat (limited to 'jenkins_jobs/config.py')
-rw-r--r-- | jenkins_jobs/config.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jenkins_jobs/config.py b/jenkins_jobs/config.py index c4e63807..535a1910 100644 --- a/jenkins_jobs/config.py +++ b/jenkins_jobs/config.py @@ -41,6 +41,7 @@ recursive=False exclude=.* allow_duplicates=False allow_empty_variables=False +retain_anchors=False # other named sections could be used in addition to the implicit [jenkins] # if you have multiple jenkins servers. @@ -305,6 +306,13 @@ class JJBConfig(object): config.has_option('job_builder', 'allow_empty_variables') and config.getboolean('job_builder', 'allow_empty_variables')) + # retain anchors across files? + retain_anchors = False + if config and config.has_option('job_builder', 'retain_anchors'): + retain_anchors = config.getboolean('job_builder', + 'retain_anchors') + self.yamlparser['retain_anchors'] = retain_anchors + def validate(self): # Inform the user as to what is likely to happen, as they may specify # a real jenkins instance in test mode to get the plugin info to check |