sidetag-koji-plugin

Created 5 years ago
Maintained by mizdebsk
Koji plugin that gives unpriviledged Koji users limited ability to create tags
Members 3
Tomas Kopecek committed 4 years ago

Sidetag Koji plugin

WARNING / REPO MOVED

This plugin is now merged to main koji repo. File new issues there.

Hub plugin

Installation

First install plugin file in Koji hub file system:

mkdir -p /usr/lib/koji-hub-plugins/
cp sidetag_hub.py /usr/lib/koji-hub-plugins/sidetag.py

And then enable it in hub config. Minimal example /etc/koji-hub/hub.conf:

PluginPath = /usr/lib/koji-hub-plugins
Plugins = sidetag

[policy]
sidetag =
    tag f30-build :: allow
    all :: deny

Koji hub needs to be restarted for the changes to take effect:

systemctl restart httpd

Now Sidetag Koji plugin should be installed. To verify that, run koji list-api command -- it should now display createSideTag as one of available API calls.

Usage

Example plugin usage from Python:

import koji
ks = koji.ClientSession('https://koji.fedoraproject.org/kojihub')
ks.gssapi_login()
ks.createSideTag('f30-build')

CLI plugin

Installation

Plugin can be installed in python site-packages.

mkdir -p /usr/lib/python3.7/site-packages/koji_cli_plugins
cp sidetag_cli.py /usr/lib/koji-hub-plugins/sidetag.py

CLI plugin is automatically pulled by koji, so you can use it immediately.

Usage

$ koji add-sidetag f30-build --wait f30-build-side-123456 Successfully waited 1:36 for a new f30-build-side-123456 repo

$ koji remove-sidetag f30-build-side-123456

Copying

This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is contained in the LICENSE.txt file.