Print config-xml warning once
Instead of printing the deprecation warning against every generated config-xml file, print it only once at the beginning of the test command call to not spam the console. Change-Id: Ifdcdb1373d44ba6232ea7a5359662cc760353774 Signed-off-by: Thanh Ha <zxiiro@linux.com>
This commit is contained in:
parent
6b6e8fb4e1
commit
e07ad13ad0
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user