Tweak jenkins-jobs to conform with pep8 (v1.2)
Change-Id: I91ecac2e8d2d6b6b58f9a7fccc91897270ffe44d Reviewed-on: https://review.openstack.org/13267 Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
This commit is contained in:
parent
d4e443e632
commit
a760c88433
10
jenkins-jobs
10
jenkins-jobs
@ -5,6 +5,7 @@ import argparse
|
|||||||
import ConfigParser
|
import ConfigParser
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
subparser = parser.add_subparsers(help='update, test or delete job',
|
subparser = parser.add_subparsers(help='update, test or delete job',
|
||||||
@ -14,7 +15,8 @@ def main():
|
|||||||
parser_update.add_argument('name', help='name of job', nargs='?')
|
parser_update.add_argument('name', help='name of job', nargs='?')
|
||||||
parser_test = subparser.add_parser('test')
|
parser_test = subparser.add_parser('test')
|
||||||
parser_test.add_argument('path', help='Path to YAML file or directory')
|
parser_test.add_argument('path', help='Path to YAML file or directory')
|
||||||
parser_test.add_argument('-o', dest='output_dir', help='Path to output XML')
|
parser_test.add_argument('-o', dest='output_dir',
|
||||||
|
help='Path to output XML')
|
||||||
parser_test.add_argument('name', help='name of job', nargs='?')
|
parser_test.add_argument('name', help='name of job', nargs='?')
|
||||||
parser_delete = subparser.add_parser('delete')
|
parser_delete = subparser.add_parser('delete')
|
||||||
parser_delete.add_argument('name', help='name of job')
|
parser_delete.add_argument('name', help='name of job')
|
||||||
@ -41,9 +43,9 @@ def main():
|
|||||||
else:
|
else:
|
||||||
config = {}
|
config = {}
|
||||||
logger.debug("Config: {0}".format(config))
|
logger.debug("Config: {0}".format(config))
|
||||||
builder = jenkins_jobs.builder.Builder(config.get('jenkins','url'),
|
builder = jenkins_jobs.builder.Builder(config.get('jenkins', 'url'),
|
||||||
config.get('jenkins','user'),
|
config.get('jenkins', 'user'),
|
||||||
config.get('jenkins','password'))
|
config.get('jenkins', 'password'))
|
||||||
|
|
||||||
if options.command == 'delete':
|
if options.command == 'delete':
|
||||||
logger.info("Deleting job {0}".format(options.name))
|
logger.info("Deleting job {0}".format(options.name))
|
||||||
|
Loading…
Reference in New Issue
Block a user