draft build is a special build whose release has a suffix (#draft_). It can be "promoted" to a regular build by removing the draft suffix from release after built.
In this initial implementation of draft builds:
we provide a draft option to RPM build (and RPM wrapper build) so that build task can produce the draft build directly
we provide a new promoteBuild API to allow users to promote a draft build
we don't provide a "demote" method to revert the promotion
"draft_promotion" policy is introduced to customize the execution privilege of promoteBuild API
is_draft policy test to check if a build is draft. It can be used for tag policy
we use build.extra.draft to save the draft data
the "draft release suffix" is generated by brew. we don't provided a custom one so far
most build/rpm query APIs support a bit flag option: draft now. The possible values are in koji.DRAFT_FLAG: DRAFT(1), REGULAR(2), ALL(3)(DEFAULT)
rpms are not unique internally anymore (they are still unique with draft=False), so we should handle it with care, especially within repo/buildroot
(I had some code to check the nvra uniqueness in buildroot, but it's questionable)
draft build is a special build whose release has a suffix (#draft_). It can be "promoted" to a regular build by removing the
draft suffixfrom release after built.In this initial implementation of draft builds:
draftoption to RPM build (and RPM wrapper build) so that build task can produce the draft build directlypromoteBuildAPI to allow users to promote a draft build"draft_promotion"policy is introduced to customize the execution privilege ofpromoteBuildAPIis_draftpolicy test to check if a build is draft. It can be used fortagpolicybuild.extra.draftto save the draft datadraftnow. The possible values are inkoji.DRAFT_FLAG: DRAFT(1), REGULAR(2), ALL(3)(DEFAULT)(I had some code to check the nvra uniqueness in buildroot, but it's questionable)