#4376 dist-repo, optionally include or exclude drafts
Opened by stevetraylen. Modified
stevetraylen/koji distdraft  into  master

Download 4376.patch

Two new options to koji dist-repo.

  • --with-draft will consider a draft build as the latest build.
  • --without-draft will ignore draft builds and just typically take
    the latest non-draft build.

The default remains and if dist-repo encounters a draft build with
out one of the above options dist-repo will continue to exit.

Motivation here is to allow dist-repo to be used against tags containing
draft builds which is currently not possible.

Examples:

A tag containing two builds:
* myrpm-1.1-37.el9.x86_64.rpm NOT DRAFT
* myrpm-1.1-38.el9.x86_64.rpm DRAFT

koji dist-repo mytag9al-testing
        FAILED: BuildError: Draft build: myrpm-1.1-38.el9,draft_4 is not allowed
koji dist-repo mytag9al-testing --with-draft
         Deploys the DRAFT one.
koji dist-repo mytag9al-testing --without-draft
         Deploys the NOT DRAFT one.

rebased onto fca44b55b2da50da2c4036f95c2ed36788fd22fb

rebased onto f2b13a9ae219f14c3400f38587416fa9d1255b2e

rebased onto a2d2e35dc1764b508d601289265e2fc92152dde3

I am still planning to update this respecting the comments in

https://pagure.io/koji/issue/4468

Metadata