mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-13 01:54:59 +08:00
Don't build from scm locally
This commit is contained in:
@@ -241,7 +241,7 @@ class CoprModuleBuilder(GenericBuilder):
|
||||
with CoprModuleBuilder._build_lock:
|
||||
# Git sources are treated specially.
|
||||
if source.startswith(("git://", "http://", "https://")):
|
||||
return build_from_scm(artifact_name, source, self.config, self.build_srpm)
|
||||
return self.build_scm(source)
|
||||
else:
|
||||
return self.build_srpm(artifact_name, source)
|
||||
|
||||
@@ -257,13 +257,14 @@ class CoprModuleBuilder(GenericBuilder):
|
||||
return response.data["ids"][0], koji.BUILD_STATES["BUILDING"], response.message, None
|
||||
|
||||
def build_scm(self, source):
|
||||
# @TODO use this method once support on Copr side is finished
|
||||
# Copr is currently able to create a build from fedora distgit,
|
||||
# but not from custom distgit, such as copr-dist-git
|
||||
url, branch = source.split("?#")
|
||||
url = (url.replace("git://", "https://")
|
||||
.replace("pkgs.fedoraproject.org", "src.fedoraproject.org/git"))
|
||||
self.client.create_new_build_distgit(self.copr.projectname, url, branch=branch, username=self.copr.username)
|
||||
response = self.client.create_new_build_distgit(self.copr.projectname, url, branch=branch, username=self.copr.username)
|
||||
if response.output != "ok":
|
||||
log.error(response.error)
|
||||
|
||||
return response.data["ids"][0], koji.BUILD_STATES["BUILDING"], response.message, None
|
||||
|
||||
def finalize(self):
|
||||
modulemd = tempfile.mktemp()
|
||||
|
||||
Reference in New Issue
Block a user