mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Are any exceptions being raised?
This commit is contained in:
parent
6ba8b9efeb
commit
581f498c9f
@ -248,23 +248,23 @@ def parse():
|
|||||||
Parse the CLI options
|
Parse the CLI options
|
||||||
'''
|
'''
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
parser.add_option('--platform',
|
parser.add_option(
|
||||||
dest='platform',
|
'--platform',
|
||||||
default=os.environ.get('JENKINS_SALTCLOUD_VM_PLATFORM', None),
|
default=os.environ.get('JENKINS_SALTCLOUD_VM_PLATFORM', None),
|
||||||
help='The target platform, choose from:\ncent6\ncent5\nubuntu12.04')
|
help='The target platform, choose from:\ncent6\ncent5\nubuntu12.04')
|
||||||
parser.add_option('--provider',
|
parser.add_option(
|
||||||
dest='provider',
|
'--provider',
|
||||||
default=os.environ.get('JENKINS_SALTCLOUD_VM_PROVIDER', None),
|
default=os.environ.get('JENKINS_SALTCLOUD_VM_PROVIDER', None),
|
||||||
help='The vm provider')
|
help='The vm provider')
|
||||||
parser.add_option('--commit',
|
parser.add_option(
|
||||||
dest='commit',
|
'--commit',
|
||||||
help='The git commit to track')
|
help='The git commit to track')
|
||||||
parser.add_option('--sls',
|
parser.add_option(
|
||||||
dest='sls',
|
'--sls',
|
||||||
default='testrun',
|
default='testrun',
|
||||||
help='The sls file to execute')
|
help='The sls file to execute')
|
||||||
parser.add_option('--pillar',
|
parser.add_option(
|
||||||
dest='pillar',
|
'--pillar',
|
||||||
default='{{git_commit: {commit}}}',
|
default='{{git_commit: {commit}}}',
|
||||||
help='Pillar values to pass to the sls file')
|
help='Pillar values to pass to the sls file')
|
||||||
parser.add_option('--no-clean',
|
parser.add_option('--no-clean',
|
||||||
@ -301,11 +301,17 @@ def parse():
|
|||||||
parser.exit(0)
|
parser.exit(0)
|
||||||
|
|
||||||
if options.download_unittest_reports is not None and not options.commit:
|
if options.download_unittest_reports is not None and not options.commit:
|
||||||
|
try:
|
||||||
download_unittest_reports(options.download_unittest_reports)
|
download_unittest_reports(options.download_unittest_reports)
|
||||||
|
except Exception as exc:
|
||||||
|
print 'Caught exception while downloading unittest reports', exc
|
||||||
parser.exit(0)
|
parser.exit(0)
|
||||||
|
|
||||||
if options.download_coverage_report is not None and not options.commit:
|
if options.download_coverage_report is not None and not options.commit:
|
||||||
|
try:
|
||||||
download_coverage_report(options.download_coverage_report)
|
download_coverage_report(options.download_coverage_report)
|
||||||
|
except Exception as exc:
|
||||||
|
print 'Caught exception while downloading coverage reports', exc
|
||||||
parser.exit(0)
|
parser.exit(0)
|
||||||
|
|
||||||
if not options.platform:
|
if not options.platform:
|
||||||
|
Loading…
Reference in New Issue
Block a user