Merge "Print config-xml warning once"

This commit is contained in:
Zuul 2018-12-03 02:37:54 +00:00 committed by Gerrit Code Review
commit d15e57a14a
2 changed files with 8 additions and 8 deletions

View File

@ -79,14 +79,6 @@ class JenkinsManager(object):
output_dir = os.path.join(
output_dir, os.path.basename(item))
output_fn = os.path.join(output_dir, 'config.xml')
else:
logger.warn('(Deprecated) The default output behavior of'
' `jenkins-jobs test` when given the --output'
' flag will change in JJB 3.0.'
' Instead of writing jobs to OUTPUT/jobname;'
' they will be written to OUTPUT/jobname/config.xml.'
' The new behavior can be enabled by the passing'
' `--config-xml` parameter.')
if output_dir != output:
logger.debug("Creating directory %s" % output_dir)

View File

@ -50,6 +50,14 @@ class TestSubCommand(update.UpdateSubCommand):
help='path to output XML')
def execute(self, options, jjb_config):
if not options.config_xml:
logger.warn('(Deprecated) The default output behavior of'
' `jenkins-jobs test` when given the --output'
' flag will change in JJB 3.0.'
' Instead of writing jobs to OUTPUT/jobname;'
' they will be written to OUTPUT/jobname/config.xml.'
' The new behavior can be enabled by the passing'
' `--config-xml` parameter.')
builder, xml_jobs, xml_views = self._generate_xmljobs(
options, jjb_config)