build can wait for actual repo
New options --wait-for-build and --wait-for-repo for build command are simplification of using wait-repo + build command succession. They have same semantices as the original one. Fixes: https://pagure.io/koji/issue/1619
This commit is contained in:
parent
160780cedf
commit
418376dc81
4 changed files with 43 additions and 21 deletions
|
|
@ -42,7 +42,7 @@ class TestBuild(unittest.TestCase):
|
|||
source = 'srpm'
|
||||
task_id = 1
|
||||
args = [target, source]
|
||||
opts = {}
|
||||
opts = {'wait_builds': []}
|
||||
priority = None
|
||||
|
||||
self.session.getBuildTarget.return_value = target_info
|
||||
|
|
@ -94,7 +94,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
source = 'http://scm'
|
||||
task_id = 1
|
||||
args = [target, source]
|
||||
opts = {}
|
||||
opts = {'wait_builds': []}
|
||||
priority = None
|
||||
|
||||
self.session.getBuildTarget.return_value = target_info
|
||||
|
|
@ -201,6 +201,8 @@ Options:
|
|||
--scratch Perform a scratch build
|
||||
--wait Wait on the build, even if running in the background
|
||||
--nowait Don't wait on build
|
||||
--wait-repo Wait for the actual buildroot repo of given target
|
||||
--wait-build=NVR Wait for the given nvr to appear in buildroot repo
|
||||
--quiet Do not print the task information
|
||||
--arch-override=ARCH_OVERRIDE
|
||||
Override build arches
|
||||
|
|
@ -295,7 +297,7 @@ Options:
|
|||
task_id = 1
|
||||
repo_id = 2
|
||||
args = ['--repo-id=' + str(repo_id), target, source]
|
||||
opts = {'repo_id': repo_id, 'skip_tag': True}
|
||||
opts = {'repo_id': repo_id, 'skip_tag': True, 'wait_builds': []}
|
||||
priority = None
|
||||
|
||||
self.session.build.return_value = task_id
|
||||
|
|
@ -498,7 +500,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
'--scratch',
|
||||
target,
|
||||
source]
|
||||
opts = {'arch_override': arch_override, 'scratch': True}
|
||||
opts = {'arch_override': arch_override, 'scratch': True, 'wait_builds': []}
|
||||
priority = None
|
||||
|
||||
self.session.getBuildTarget.return_value = target_info
|
||||
|
|
@ -549,7 +551,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
task_id = 1
|
||||
args = ['--background', target, source]
|
||||
priority = 5
|
||||
opts = {}
|
||||
opts = {'wait_builds': []}
|
||||
|
||||
self.session.getBuildTarget.return_value = target_info
|
||||
self.session.getTag.return_value = dest_tag_info
|
||||
|
|
@ -597,7 +599,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
source = 'srpm'
|
||||
task_id = 1
|
||||
args = [target, source]
|
||||
opts = {}
|
||||
opts = {'wait_builds': []}
|
||||
priority = None
|
||||
|
||||
self.session.getBuildTarget.return_value = target_info
|
||||
|
|
@ -648,7 +650,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
source = 'srpm'
|
||||
task_id = 1
|
||||
args = ['--noprogress', target, source]
|
||||
opts = {}
|
||||
opts = {'wait_builds': []}
|
||||
priority = None
|
||||
|
||||
self.session.getBuildTarget.return_value = target_info
|
||||
|
|
@ -702,7 +704,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
task_id = 1
|
||||
quiet = True
|
||||
args = ['--quiet', target, source]
|
||||
opts = {}
|
||||
opts = {'wait_builds': []}
|
||||
priority = None
|
||||
|
||||
self.session.getBuildTarget.return_value = target_info
|
||||
|
|
@ -752,7 +754,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
task_id = 1
|
||||
quiet = None
|
||||
args = ['--wait', target, source]
|
||||
opts = {}
|
||||
opts = {'wait_builds': []}
|
||||
priority = None
|
||||
|
||||
self.session.getBuildTarget.return_value = target_info
|
||||
|
|
@ -805,7 +807,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
source = 'srpm'
|
||||
task_id = 1
|
||||
args = ['--nowait', target, source]
|
||||
opts = {}
|
||||
opts = {'wait_builds': []}
|
||||
priority = None
|
||||
|
||||
self.session.getBuildTarget.return_value = target_info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue