There is a Koji plugin that can create side-tags [0]. This patch adds support for a command to request new side-tags.
[0] https://pagure.io/sidetag-koji-plugin
It is used like this:
$ rpkg request-side-tag [--base-tag=FOO]
The base tag is used as a parent of the new side tag. If not given, rpkg will find build tag of current target and use it.
The plugin creates both tag and target (with the same name), so the output of rpkg contains a suggestion on how to submit builds to the new target.
Fixes: https://pagure.io/fedpkg/issue/329
This has not yet been tested as staging Koji does not let me create a side tag since I'm not an admin.
rebased onto 1c18004b50496fe3fd222d16255ffaa6ca4d1d2f
CC @pingou
Maybe we should specify what 123 is in the output? (I see if from the mock line above, it's the side-tag's id, but as a user this may not be clear if you just have this line)
123
Are there any risk associated with the base tag? Could someone, say, by-pass CI by using a inappropriate base-tag?
Good point, I'll add indication that it's ID of the tag – (id 123).
(id 123)
I don't think so, the base tag is what is tested by the hub policy. That should make it possible to prevent any abuse by only allowing side tags from correct bases.
rebased onto 0493787d277feb73a74ec56d466401bec97eb0f4
A nice piece of code (:thumbsup:)
PR is updated to include list-side-tags and remove-side-tag commands.
list-side-tags
remove-side-tag
rebased onto c997b0630353f6e6803e77e9350efb675fe3a44a
rebased onto 7d1c6091ba81f16824c8449527321068c6624a20
The updated code also looks cool.
The plugin in stage is now fixed:
# Running in a cloned package repo on f30 branch $ fedpkg-stage request-side-tag Side tag 'f30-build-side-7677' (id 7677) created. Use 'fedpkg-stage build --target=f30-build-side-7677' to use it. Use 'stg-koji wait-repo f30-build-side-7677' to wait for the build repo to be generated. $ fedpkg-stage list-side-tags f30-build-side-7669 (id 7669) f30-build-side-7671 (id 7671) f30-build-side-7677 (id 7677) $ fedpkg-stage list-side-tags --mine f30-build-side-7677 (id 7677) $ fedpkg-stage remove-side-tag f30-build-side-7669 Could not execute remove_side_tag: This is not your sidetag ERROR:pyrpkg:Could not execute remove_side_tag: This is not your sidetag $ fedpkg-stage remove-side-tag f30-build-side-7677 Tag deleted. $
I have not tested submitting any builds to the side tag, as the repo was not ready yet.
Pull-Request has been merged by lsedlar
There is a Koji plugin that can create side-tags [0]. This patch adds support for a command to request new side-tags.
[0] https://pagure.io/sidetag-koji-plugin
It is used like this:
The base tag is used as a parent of the new side tag. If not given, rpkg will find build tag of current target and use it.
The plugin creates both tag and target (with the same name), so the output of rpkg contains a suggestion on how to submit builds to the new
target.
Fixes: https://pagure.io/fedpkg/issue/329
This has not yet been tested as staging Koji does not let me create a side tag since I'm not an admin.