Skip to content

Commit

Permalink
Returncode for create job
Browse files Browse the repository at this point in the history
Exit with 1 on error
  • Loading branch information
chaosblog committed Feb 12, 2013
1 parent c7f9a86 commit 9613cdc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autojenkins/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ def list_jobs(host, options, color=True, raw=False):
if not raw:
print ("All jobs in {0}".format(host))
jenkins = Jenkins(host, proxies=get_proxy(options), auth=get_auth(options))
jobs = jenkins.all_jobs()
for name, color in jobs:
joblist = jenkins.all_jobs()
for name, color in joblist:
if '_' in color:
color = color.split('_')[0]
building = True
Expand All @@ -202,3 +202,5 @@ def main():
sys.exit(1)
elif args['create']:
success = create_job(args['<host>'], args['<jobname>'][0], args)
if not success:
sys.exit(1)

0 comments on commit 9613cdc

Please sign in to comment.