mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 03:38:12 +08:00
Get the gitref from rida.py to ridad.py.
This commit is contained in:
7
rida.py
7
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"])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user