Implement method for submitting a build from distgit source

This commit is contained in:
Jakub Kadlčík
2017-05-30 14:31:35 +02:00
parent 56efd10db9
commit 8c25f6d210

View File

@@ -256,6 +256,15 @@ 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)
def finalize(self):
modulemd = tempfile.mktemp()
self.module.mmd().dump(modulemd)