mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-01 18:01:40 +08:00
Pretend that build was successful so that rida submits next batch
This commit is contained in:
@@ -902,7 +902,9 @@ class CoprModuleBuilder(GenericBuilder):
|
||||
log.info(result.data["modulemd"])
|
||||
|
||||
# @TODO result should contain "module_id", "action_id" and "action_state"
|
||||
return None, None, result.message, "-".join([m1.name, m1.version, m1.release])
|
||||
# Since we don't have implemented messaging support in copr yet,
|
||||
# let's just assume that the build is finished by now
|
||||
return None, koji.BUILD_STATES["COMPLETE"], result.message, "-".join([m1.name, m1.version, m1.release])
|
||||
|
||||
def build_from_scm(self, artifact_name, source):
|
||||
"""
|
||||
@@ -917,7 +919,7 @@ class CoprModuleBuilder(GenericBuilder):
|
||||
|
||||
td = None
|
||||
owd = os.getcwd()
|
||||
ret = 1, koji.BUILD_STATES["FAILED"], "Cannot create SRPM", None
|
||||
ret = 1, koji.BUILD_STATES["COMPLETE"], "COPR BUILD DONE", None
|
||||
|
||||
try:
|
||||
log.debug('Cloning source URL: %s' % source)
|
||||
|
||||
@@ -251,3 +251,8 @@ def wait(config, session, msg):
|
||||
# other backends need this implemented (e.g. COPR)
|
||||
return [module_build_service.messaging.KojiRepoChange(
|
||||
'fake msg', builder.module_build_tag['name'])]
|
||||
|
||||
# We don't have copr implementation finished yet, Let's fake the repo change event,
|
||||
# as if copr builds finished successfully
|
||||
if config.system == "copr":
|
||||
return [module_build_service.messaging.KojiRepoChange('fake msg', build.koji_tag)]
|
||||
|
||||
@@ -37,7 +37,7 @@ def done(config, session, msg):
|
||||
|
||||
# First, find our ModuleBuild associated with this repo, if any.
|
||||
tag = msg.repo_tag
|
||||
if not tag.endswith('-build'):
|
||||
if config.system == "koji" and not tag.endswith('-build'):
|
||||
log.info("Tag %r does not end with '-build' suffix, ignoring" % tag)
|
||||
return
|
||||
tag = tag.strip('-build')
|
||||
@@ -130,6 +130,12 @@ def done(config, session, msg):
|
||||
|
||||
module_build_service.utils.start_build_batch(
|
||||
config, module_build, session, builder)
|
||||
|
||||
# We don't have copr implementation finished yet, Let's fake the repo change event,
|
||||
# as if copr builds finished successfully
|
||||
if config.system == "copr":
|
||||
return [module_build_service.messaging.KojiRepoChange('fake msg', module_build.koji_tag)]
|
||||
|
||||
else:
|
||||
module_build.transition(config, state=models.BUILD_STATES['done'])
|
||||
session.commit()
|
||||
|
||||
Reference in New Issue
Block a user