Convert multiline strings to concatenated single-quote.
Change-Id: Ic0c1be9ca037b67695136583837702d3ec4d42a8
This commit is contained in:
parent
e1de6f22ff
commit
e93f4a5f5a
@ -32,52 +32,51 @@ def create_parser():
|
||||
parser.add_argument(
|
||||
'--conf',
|
||||
dest='conf',
|
||||
help='''configuration file''')
|
||||
help="configuration file")
|
||||
parser.add_argument(
|
||||
'-l',
|
||||
'--log_level',
|
||||
dest='log_level',
|
||||
default='info',
|
||||
help='''log level (default: %(default)s)''')
|
||||
help="log level (default: %(default)s)")
|
||||
parser.add_argument(
|
||||
'--ignore-cache',
|
||||
action='store_true',
|
||||
dest='ignore_cache',
|
||||
default=None,
|
||||
help='''ignore the cache and update the jobs anyhow (that will only
|
||||
flush the specified jobs cache)''')
|
||||
help="ignore the cache and update the jobs anyhow (that will "
|
||||
"only flush the specified jobs cache)")
|
||||
parser.add_argument(
|
||||
'--flush-cache',
|
||||
action='store_true',
|
||||
dest='flush_cache',
|
||||
default=None,
|
||||
help='''flush all the cache entries before updating''')
|
||||
help="flush all the cache entries before updating")
|
||||
parser.add_argument(
|
||||
'--version',
|
||||
dest='version',
|
||||
action='version',
|
||||
version=__version__(),
|
||||
help='''show version''')
|
||||
help="show version")
|
||||
parser.add_argument(
|
||||
'--allow-empty-variables',
|
||||
action='store_true',
|
||||
dest='allow_empty_variables',
|
||||
default=None,
|
||||
help='''Don\'t fail if any of the variables inside any string are
|
||||
not defined, replace with empty string instead.''')
|
||||
help="Don\'t fail if any of the variables inside any string are "
|
||||
"not defined, replace with empty string instead.")
|
||||
parser.add_argument(
|
||||
'--user', '-u',
|
||||
help='''The Jenkins user to use for authentication. This overrides
|
||||
the user specified in the configuration file.''')
|
||||
help="The Jenkins user to use for authentication. This overrides "
|
||||
"the user specified in the configuration file.")
|
||||
parser.add_argument(
|
||||
'--password', '-p',
|
||||
help='''Password or API token to use for authenticating towards
|
||||
Jenkins. This overrides the password specified in the configuration
|
||||
file.''')
|
||||
help="Password or API token to use for authenticating towards Jenkins."
|
||||
" This overrides the password specified in the configuration file.")
|
||||
|
||||
subparser = parser.add_subparsers(
|
||||
dest='command',
|
||||
help='''update, test or delete job''')
|
||||
help="update, test or delete job")
|
||||
|
||||
extension_manager = extension.ExtensionManager(
|
||||
namespace='jjb.cli.subcommands',
|
||||
|
@ -56,12 +56,12 @@ class BaseSubCommand(object):
|
||||
action='store_true',
|
||||
dest='recursive',
|
||||
default=False,
|
||||
help='''look for yaml files recursively''')
|
||||
help="look for yaml files recursively")
|
||||
|
||||
parser.add_argument(
|
||||
'-x', '--exclude',
|
||||
dest='exclude',
|
||||
action='append',
|
||||
default=[],
|
||||
help='''paths to exclude when using recursive search, uses standard
|
||||
globbing.''')
|
||||
help="paths to exclude when using recursive search, "
|
||||
"uses standard globbing.")
|
||||
|
@ -34,8 +34,8 @@ class DeleteSubCommand(base.BaseSubCommand):
|
||||
delete.add_argument(
|
||||
'-p', '--path',
|
||||
default=None,
|
||||
help='''colon-separated list of paths to YAML files or
|
||||
directories''')
|
||||
help="colon-separated list of paths to YAML files "
|
||||
"or directories")
|
||||
|
||||
def execute(self, options, jjb_config):
|
||||
builder = JenkinsManager(jjb_config)
|
||||
|
@ -30,8 +30,8 @@ class DeleteAllSubCommand(base.BaseSubCommand):
|
||||
def parse_args(self, subparser):
|
||||
delete_all = subparser.add_parser(
|
||||
'delete-all',
|
||||
help='''delete *ALL* jobs from Jenkins server, including those not
|
||||
managed by Jenkins Job Builder.''')
|
||||
help="delete *ALL* jobs from Jenkins server, including "
|
||||
"those not managed by Jenkins Job Builder.")
|
||||
|
||||
self.parse_option_recursive_exclude(delete_all)
|
||||
|
||||
|
@ -35,8 +35,8 @@ class UpdateSubCommand(base.BaseSubCommand):
|
||||
'path',
|
||||
nargs='?',
|
||||
default=sys.stdin,
|
||||
help='''colon-separated list of paths to YAML files or
|
||||
directories''')
|
||||
help="colon-separated list of paths to YAML files "
|
||||
"or directories")
|
||||
|
||||
def parse_arg_names(self, parser):
|
||||
parser.add_argument(
|
||||
@ -62,8 +62,8 @@ class UpdateSubCommand(base.BaseSubCommand):
|
||||
type=int,
|
||||
default=1,
|
||||
dest='n_workers',
|
||||
help='''number of workers to use, 0 for autodetection and 1 for
|
||||
just one worker.''')
|
||||
help="number of workers to use, 0 for autodetection and 1 "
|
||||
"for just one worker.")
|
||||
|
||||
def _generate_xmljobs(self, options, jjb_config=None):
|
||||
builder = JenkinsManager(jjb_config)
|
||||
|
@ -159,8 +159,9 @@ class JJBConfig(object):
|
||||
logger.debug("Reading config from {0}".format(config_filename))
|
||||
config_fp = io.open(config_filename, 'r', encoding='utf-8')
|
||||
else:
|
||||
raise JJBConfigException("""A valid configuration file is required.
|
||||
\n{0} is not valid.""".format(config_filename))
|
||||
raise JJBConfigException(
|
||||
"A valid configuration file is required. "
|
||||
"\n{0} is not valid.".format(config_filename))
|
||||
|
||||
return config_fp
|
||||
|
||||
@ -171,10 +172,10 @@ class JJBConfig(object):
|
||||
|
||||
# check the ignore_cache setting
|
||||
if config.has_option('jenkins', 'ignore_cache'):
|
||||
logging.warn('''ignore_cache option should be moved to the
|
||||
[job_builder] section in the config file, the one
|
||||
specified in the [jenkins] section will be ignored in
|
||||
the future''')
|
||||
logging.warn("ignore_cache option should be moved to the "
|
||||
"[job_builder] section in the config file, the "
|
||||
"one specified in the [jenkins] section will be "
|
||||
"ignored in the future")
|
||||
self.ignore_cache = config.getboolean('jenkins', 'ignore_cache')
|
||||
elif config.has_option('job_builder', 'ignore_cache'):
|
||||
self.ignore_cache = config.getboolean('job_builder',
|
||||
|
Loading…
Reference in New Issue
Block a user