diff --git a/rida.py b/rida.py index cb6c84e5..eac87544 100755 --- a/rida.py +++ b/rida.py @@ -135,7 +135,12 @@ def submit_build(): return failure("Failed to get the latest commit: %s" % pkgname, 422) if not rida.scm.SCM(pkg["repository"] + "?#" + pkg["commit"]).is_available(): return failure("Cannot checkout %s" % pkgname, 422) - build = rida.database.ComponentBuild(module_id=module.id, package=pkgname, format="rpms") + build = rida.database.ComponentBuild( + module_id=module.id, + package=pkgname, + format="rpms", + gitref=pkg["commit"], # TODO - re-evaluate this w.r.t. supported branches + ) db.session.add(build) module.modulemd = mmd.dumps() module.transition(conf, rida.database.BUILD_STATES["wait"]) diff --git a/rida/database.py b/rida/database.py index 9053eb8d..0a39ce80 100644 --- a/rida/database.py +++ b/rida/database.py @@ -226,6 +226,7 @@ class ComponentBuild(Base): __tablename__ = "component_builds" id = Column(Integer, primary_key=True) package = Column(String, nullable=False) + gitref = Column(String, nullable=False) # XXX: Consider making this a proper ENUM format = Column(String, nullable=False) build_id = Column(Integer) # This is the id of the build in koji