<commit_before>Koji containerbuild
===================

This package extends Koji buildsystem with plugin which allows building
containers via OpenShift buildsystem. Additionally it provides CLI tool to
submit builds based on koji CLI.

Most likely you'll need to run own OpenShift instance. See OpenShift
documentation how to setup that.

Build a package
---------------

To build the current release, use the following command in the repo directory::

  tito build --rpm

Create release tarball
----------------------

To create tarball for a release run::

  python setup.py sdist

Create new release
------------------

Create upstream release
~~~~~~~~~~~~~~~~~~~~~~~

In this upstream repository:

1. Bump release and commit changelog:

    * If this is downstream update, run::

        tito tag

    * If this is upstream update you need to specify version. It needs to be without release part, only dot separated one (for example 0.5.7)::

        tito tag --use-version 0.5.7

2. See last line of tito output which give you a hint how to push commit and tag to remote (for example 0.5.7-1)::

    git push origin
    git push origin koji-containerbuild-0.5.7-1


3. Create srpm::

    tito build --srpm

Update downstream release
~~~~~~~~~~~~~~~~~~~~~~~~~
Following steps are for updating packages in Fedora:

1. Clone or pull latest changes in downstream repository::

    fedpkg co koji-containerbuild

2. Switch to branch which you want to update (e.g. start with master)::

    fedpkg switch-branch master

3. Import srpm created in previos section (for example koji-containerbuild version 0.5.7-1, updating Fedora 24)::

    fedpkg import /tmp/tito/koji-containerbuild-0.5.7-1.f24.src.rpm

  Review changes - there should be single new tarball, entries in changelog looks fine (e.g. not empty).

4. Try to build package as scratch-build::

    fedpkg scratch-build --srpm

5. If build succeeded commit changes to remote and build regular build::

    fedpkg push
    fedpkg build

Update other branches either by merging (preferred) or importing srpm.

Plugin installation
-------------------

Koji hub
~~~~~~~~

If you already use any Koji hub plugin you need to use same path for this
plugin too. Default path used by Koji hub is `/usr/lib/koji-hub-plugins`.

Modify `/etc/koji-hub.conf`:

* set `PluginPath` to a directory which contains `hub_containerbuild.py` from this
  package.

* add `hub_containerbuild` value to `Plugins`. If you have already some plugin
  enabled use space as a separator between names.

Finally (graceful) restart httpd daemon.

Koji builder
~~~~~~~~~~~~

`osbs <https://github.com/DBuildService/osbs>`_ package is required. In Fedora it
is part of official repositories. Additionally you'll need to modify
`/etc/osbs.conf` with addresses to OpenShift buildystem instance and registry.
Follow osbs documentation if you find any.

Similarly to Koji hub you'll need to find out which path will be used for
plugins. Default path used by Koji builder is `/usr/lib/koji-builder-plugins`.

* set `PluginPath` to a directory which contains `builder_containerbuild.py` from
  this package.

* add `builder_containerbuild` value to `Plugins`. Similarly to Koji hub use space
  to separate existing plugin names.<commit_msg>README: updates for osbs-client package<commit_after>Koji containerbuild
===================

This package extends Koji buildsystem with plugin which allows building
containers via OpenShift buildsystem. Additionally it provides CLI tool to
submit builds based on koji CLI.

Most likely you'll need to run own OpenShift instance. See OpenShift
documentation how to setup that.

Build a package
---------------

To build the current release, use the following command in the repo directory::

  tito build --rpm

Create release tarball
----------------------

To create tarball for a release run::

  python setup.py sdist

Create new release
------------------

Create upstream release
~~~~~~~~~~~~~~~~~~~~~~~

In this upstream repository:

1. Bump release and commit changelog:

    * If this is downstream update, run::

        tito tag

    * If this is upstream update you need to specify version. It needs to be without release part, only dot separated one (for example 0.5.7)::

        tito tag --use-version 0.5.7

2. See last line of tito output which give you a hint how to push commit and tag to remote (for example 0.5.7-1)::

    git push origin
    git push origin koji-containerbuild-0.5.7-1


3. Create srpm::

    tito build --srpm

Update downstream release
~~~~~~~~~~~~~~~~~~~~~~~~~
Following steps are for updating packages in Fedora:

1. Clone or pull latest changes in downstream repository::

    fedpkg co koji-containerbuild

2. Switch to branch which you want to update (e.g. start with master)::

    fedpkg switch-branch master

3. Import srpm created in previos section (for example koji-containerbuild version 0.5.7-1, updating Fedora 24)::

    fedpkg import /tmp/tito/koji-containerbuild-0.5.7-1.f24.src.rpm

  Review changes - there should be single new tarball, entries in changelog looks fine (e.g. not empty).

4. Try to build package as scratch-build::

    fedpkg scratch-build --srpm

5. If build succeeded commit changes to remote and build regular build::

    fedpkg push
    fedpkg build

Update other branches either by merging (preferred) or importing srpm.

Plugin installation
-------------------

Koji hub
~~~~~~~~

If you already use any Koji hub plugin you need to use same path for this
plugin too. Default path used by Koji hub is `/usr/lib/koji-hub-plugins`.

Modify `/etc/koji-hub.conf`:

* set `PluginPath` to a directory which contains `hub_containerbuild.py` from this
  package.

* add `hub_containerbuild` value to `Plugins`. If you have already some plugin
  enabled use space as a separator between names.

Finally (graceful) restart httpd daemon.

Koji builder
~~~~~~~~~~~~

The Koji builder plugin requires the `osbs-client
<https://github.com/projectatomic/osbs-client>`_ package. In Fedora it is part
of the official repositories. Additionally you'll need to modify
`/etc/osbs.conf` with the addresses to your OpenShift buildystem instance and
registry. Follow the `osbs documentation <https://osbs.readthedocs.io/>`_.

Similarly to Koji hub you'll need to find out which path will be used for
plugins. Default path used by Koji builder is `/usr/lib/koji-builder-plugins`.

* set `PluginPath` to a directory which contains `builder_containerbuild.py` from
  this package.

* add `builder_containerbuild` value to `Plugins`. Similarly to Koji hub use space
  to separate existing plugin names.
{'fraction_non_alphanumeric': 0.10701330108827085, 'fraction_numerical': 0.010278113663845224, 'mean_word_length': 3.4409395973154364, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2694626', 'n_tokens_mistral': 1884, 'n_tokens_neox': 1778, 'n_words': 862}