Merge pull request #54 from openSUSE/coolo_1587
osc staging check with argument should give more output than without
This commit is contained in:
commit
1d37f18903
@ -184,7 +184,7 @@ def do_staging(self, subcmd, opts, *args):
|
|||||||
# call the respective command and parse args by need
|
# call the respective command and parse args by need
|
||||||
if cmd in ['check']:
|
if cmd in ['check']:
|
||||||
if len(args) > 1:
|
if len(args) > 1:
|
||||||
return api.check_project_status(api.prj_from_letter(args[1]))
|
return api.check_project_status(api.prj_from_letter(args[1]), verbose=True)
|
||||||
for prj in api.get_staging_projects():
|
for prj in api.get_staging_projects():
|
||||||
print("Checking {}".format(prj))
|
print("Checking {}".format(prj))
|
||||||
api.check_project_status(prj)
|
api.check_project_status(prj)
|
||||||
|
@ -396,7 +396,7 @@ class StagingAPI(object):
|
|||||||
state = 'missing reviews: ' + ', '.join(failing_groups)
|
state = 'missing reviews: ' + ', '.join(failing_groups)
|
||||||
return '{0}: {1}'.format(package, state)
|
return '{0}: {1}'.format(package, state)
|
||||||
|
|
||||||
def check_project_status(self, project):
|
def check_project_status(self, project, verbose=False):
|
||||||
"""
|
"""
|
||||||
Checks a staging project for acceptance. Checks all open requests for open reviews
|
Checks a staging project for acceptance. Checks all open requests for open reviews
|
||||||
and build status
|
and build status
|
||||||
@ -422,7 +422,8 @@ class StagingAPI(object):
|
|||||||
if ret:
|
if ret:
|
||||||
print(ret)
|
print(ret)
|
||||||
all = False
|
all = False
|
||||||
break # TODO: offer a details option
|
if not verbose:
|
||||||
|
break
|
||||||
|
|
||||||
buildstatus = self.gather_build_status(project)
|
buildstatus = self.gather_build_status(project)
|
||||||
if buildstatus:
|
if buildstatus:
|
||||||
@ -516,14 +517,15 @@ class StagingAPI(object):
|
|||||||
else:
|
else:
|
||||||
return [project, working, broken]
|
return [project, working, broken]
|
||||||
|
|
||||||
def print_build_status_details(self, details):
|
def print_build_status_details(self, details, verbose=False):
|
||||||
project, working, broken = details
|
project, working, broken = details
|
||||||
|
|
||||||
if len(working) != 0:
|
if len(working) != 0:
|
||||||
print("At least following repositories is still building:")
|
print("At least following repositories is still building:")
|
||||||
for i in working:
|
for i in working:
|
||||||
print(" {0}: {1}".format(i['path'], i['state']))
|
print(" {0}: {1}".format(i['path'], i['state']))
|
||||||
break # TODO offer details option
|
if not verbose:
|
||||||
|
break
|
||||||
print
|
print
|
||||||
if len(broken) != 0:
|
if len(broken) != 0:
|
||||||
print("Following packages are broken:")
|
print("Following packages are broken:")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user