| |
@@ -1,6 +1,15 @@
|
| |
Ursa-Major
|
| |
==========
|
| |
|
| |
+ .. image:: https://img.shields.io/pypi/v/ursa-major.svg
|
| |
+ :alt: PyPI
|
| |
+
|
| |
+ .. image:: https://img.shields.io/pypi/l/ursa-major.svg
|
| |
+ :alt: PyPI - License
|
| |
+
|
| |
+ .. image:: https://img.shields.io/pypi/pyversions/ursa-major.svg
|
| |
+ :alt: PyPI - Python Version
|
| |
+
|
| |
Ursa-Major is a utility to help managing module's koji tags in koji's
|
| |
inheritance. It reads configuration for tags from a tag config file, then
|
| |
update koji's inheritance accordingly.
|
| |
@@ -68,7 +77,7 @@
|
| |
|
| |
For each tag, ``owners`` can be set with email addresses.
|
| |
|
| |
- The default tag config file used by Ursa-Major is `ursa-major.json` in current
|
| |
+ The default tag config file used by Ursa-Major is ``ursa-major.json`` in current
|
| |
working directory. You can change it with ``--tag-config-file``.
|
| |
|
| |
|
| |
@@ -95,13 +104,13 @@
|
| |
[main]
|
| |
# See https://docs.python.org/3/library/logging.html#logging-levels
|
| |
log_level = info
|
| |
-
|
| |
+
|
| |
[koji]
|
| |
profile = koji
|
| |
-
|
| |
+
|
| |
[mbs]
|
| |
server_url = https://mbs.fedoraproject.org/
|
| |
-
|
| |
+
|
| |
[mail]
|
| |
mail_processing = true
|
| |
mail_log_level = info
|
| |
@@ -117,17 +126,17 @@
|
| |
Sub Commands
|
| |
============
|
| |
|
| |
- Global arguments of `ursa-major`:
|
| |
+ Global arguments of ``ursa-major``:
|
| |
|
| |
- * `--debug` (optional): print debug messages
|
| |
+ * ``--debug`` (optional): print debug messages
|
| |
|
| |
- * `--dry-run` (optional): run in dry-run mode, not do any real change
|
| |
+ * ``--dry-run`` (optional): run in dry-run mode, not do any real change
|
| |
|
| |
- * `--config` (optional): default if `/etc/ursa-major/ursa-major.conf`
|
| |
+ * ``--config`` (optional): default if ``/etc/ursa-major/ursa-major.conf``
|
| |
|
| |
- * `--user-config` (optional): default is `~/.config/ursa-major/ursa-major.conf`
|
| |
+ * ``--user-config`` (optional): default is ``~/.config/ursa-major/ursa-major.conf``
|
| |
|
| |
- * `--tag-config-file` (optional): default is `$PWD/ursa-major.json`
|
| |
+ * ``--tag-config-file`` (optional): default is ``$PWD/ursa-major.json``
|
| |
|
| |
|
| |
show-config
|
| |
@@ -138,7 +147,7 @@
|
| |
|
| |
Arguments:
|
| |
|
| |
- * `--tag` (optional): only show config content under this tag
|
| |
+ * ``--tag`` (optional): only show config content under this tag
|
| |
|
| |
Example:
|
| |
|
| |
@@ -157,8 +166,8 @@
|
| |
|
| |
Checks include:
|
| |
|
| |
- * `name`, `stream` and `priority` are required for a module
|
| |
- * `priority` value should not conflict with other parent tags which not belong
|
| |
+ * ``name``, ``stream`` and ``priority`` are required for a module
|
| |
+ * ``priority`` value should not conflict with other parent tags which not belong
|
| |
to this module in tag's inheritance
|
| |
* ...
|
| |
|
| |
@@ -171,13 +180,15 @@
|
| |
|
| |
Arguments:
|
| |
|
| |
- * `--tag` (required): remove module from this tag
|
| |
+ * ``--tag`` (required): remove module from this tag
|
| |
+
|
| |
+ * ``--name`` (required): module name
|
| |
|
| |
- * `--name` (required): module name
|
| |
+ * ``--stream`` (required): module stream
|
| |
|
| |
- * `--stream` (required): module stream
|
| |
+ * ``--require`` (optional): module's runtime requires, can be specified multiple times
|
| |
|
| |
- * `--require` (optional): module's runtime requires, can be specified multiple times
|
| |
+ * ``--buildrequire`` (optional): module's buildrequires, can be specified multiple times
|
| |
|
| |
|
| |
Example:
|
| |
@@ -186,9 +197,9 @@
|
| |
|
| |
$ ursa-major remove-module --tag fedora-30-test-build --name testmodule --stream f30
|
| |
|
| |
- This will remove the module of `testmodule:f30` from tag config file if it's
|
| |
- s present under tag `fedora-30-test-build`. And if there are some tags belong
|
| |
- to `testmodule:f30` exist in `fedora-30-test-build`'s inheritance, those tags
|
| |
+ This will remove the module of ``testmodule:f30`` from tag config file if it's
|
| |
+ s present under tag ``fedora-30-test-build``. And if there are some tags belong
|
| |
+ to ``testmodule:f30`` exist in ``fedora-30-test-build``'s inheritance, those tags
|
| |
are also removed from inheritance.
|
| |
|
| |
add-module
|
| |
@@ -199,23 +210,25 @@
|
| |
|
| |
Arguments:
|
| |
|
| |
- * `--tag` (required): add module to this tag
|
| |
+ * ``--tag`` (required): add module to this tag
|
| |
+
|
| |
+ * ``--name`` (required): module name
|
| |
|
| |
- * `--name` (required): module name
|
| |
+ * ``--stream`` (required): module stream
|
| |
|
| |
- * `--stream` (required): module stream
|
| |
+ * ``--priority`` (required): priority value when add tag to inheritance
|
| |
|
| |
- * `--priority` (required): priority value when add tag to inheritance
|
| |
+ * ``--require`` (optional): module's runtime requires, can be specified multiple times
|
| |
|
| |
- * `--require` (optional): module's runtime requires, can be specified multiple times
|
| |
+ * ``--buildrequire`` (optional): module's buildrequires, can be specified multiple times
|
| |
|
| |
- * `--force` (optional): allow to add module that doesn't have a build in MBS yet
|
| |
+ * ``--force`` (optional): allow to add module that doesn't have a build in MBS yet
|
| |
|
| |
- * `--wait-regen-repo` (optional): wait for regen-repo task to finish
|
| |
+ * ``--wait-regen-repo`` (optional): wait for regen-repo task to finish
|
| |
|
| |
- * `--update-config-only` (optinal): only update tag config file, not update tag inheritance
|
| |
+ * ``--update-config-only`` (optinal): only update tag config file, not update tag inheritance
|
| |
|
| |
- * `--update-inheritance-only` (optional): only update tag inheritance, not update tag config file
|
| |
+ * ``--update-inheritance-only`` (optional): only update tag inheritance, not update tag config file
|
| |
|
| |
Example:
|
| |
|
| |
@@ -223,8 +236,8 @@
|
| |
|
| |
$ ursa-major add-module --tag fedora-30-test-build --name testmodule --stream f30 --priority 100
|
| |
|
| |
- If the specified module with that `name` and `stream` already exists in tag
|
| |
- config file, Ursa-Major will check whether `requires` or `priority` is
|
| |
+ If the specified module with that ``name`` and ``stream`` already exists in tag
|
| |
+ config file, Ursa-Major will check whether ``requires`` or ``priority`` is
|
| |
different from the value specified in command line, if true, the tag config
|
| |
file will be updated to use the values specified. Tag inheritance will be
|
| |
updated to remove tags belong to the old module, and add the latest module
|
| |
@@ -232,15 +245,15 @@
|
| |
|
| |
The specified module in command line should has at least one built module
|
| |
(state name is 'ready') in MBS, so Ursa-Major can get the latest module build's
|
| |
- koji tag, if you want to specify a un-built module, you can run `add-module`
|
| |
- with `--force`.
|
| |
+ koji tag, if you want to specify a un-built module, you can run ``add-module``
|
| |
+ with ``--force``.
|
| |
|
| |
- You can run the command with `--update-inheritance-only` if you want to update
|
| |
- the tag inheritance only. And run with `--update-config-only` if want to update
|
| |
+ You can run the command with ``--update-inheritance-only`` if you want to update
|
| |
+ the tag inheritance only. And run with ``--update-config-only`` if want to update
|
| |
tag config file only, this is just similiar to change the tag config file
|
| |
directly, but do some checks for you at the some time.
|
| |
|
| |
- When any tag is added to tag inheritance, Ursa-Major also submit `regen-repo`
|
| |
+ When any tag is added to tag inheritance, Ursa-Major also submit ``regen-repo``
|
| |
tasks for the build tags in inheritance data. If the specified tag is a build
|
| |
tag, it's the only one build tag Ursa-Major will regen-repo for. Or Ursa-Major
|
| |
will check the tag's inheritance data, if it reaches the first build tag in
|
| |
@@ -262,7 +275,7 @@
|
| |
└─alt-product-foo-build (*)
|
| |
|
| |
In this case, there is one build tag found for 'my-example-tag', it is:
|
| |
- `product-foo-build`. Ursa-Major stops at 'product-foo-build', so
|
| |
+ ``product-foo-build``. Ursa-Major stops at 'product-foo-build', so
|
| |
'tmp-product-foo-build' and 'alt-product-foo-build' are not checked at all.
|
| |
|
| |
Example #2:
|
| |
@@ -285,14 +298,14 @@
|
| |
├─tmp-product-foo-build (*)
|
| |
└─alt-product-foo-build (*)
|
| |
|
| |
- In this case, there are 3 build tags found for `my-example-tag`, they are:
|
| |
- `tmp-product-foo-python-build`, `product-foo-container-build` and
|
| |
- `product-foo-build`. `product-foo-module-hotfix-build` is a build tag, but
|
| |
+ In this case, there are 3 build tags found for ``my-example-tag``, they are:
|
| |
+ ``tmp-product-foo-python-build``, ``product-foo-container-build`` and
|
| |
+ ``product-foo-build``. ``product-foo-module-hotfix-build`` is a build tag, but
|
| |
Ursa-Major doesn't count it in, because it stops at tag 'module-123456-build'
|
| |
which name starts with 'module-'.
|
| |
|
| |
add-tag
|
| |
- ----------
|
| |
+ -------
|
| |
|
| |
Reads module state change message from an environment variable and then add
|
| |
the module's koji tag tag inheritance according to tag config file if the
|
| |
@@ -301,12 +314,12 @@
|
| |
|
| |
Arguments:
|
| |
|
| |
- * `--module-from-env` (optional): the environment variable Ursa-Major read the
|
| |
- module state change message from, by default it's `CI_MESSAGE`
|
| |
+ * ``--module-from-env`` (optional): the environment variable Ursa-Major read the
|
| |
+ module state change message from, by default it's ``CI_MESSAGE``
|
| |
|
| |
- * `--wait-regen-repo` (optinal): wait for regen-repo tasks to finish, default is `False`
|
| |
+ * ``--wait-regen-repo`` (optinal): wait for regen-repo tasks to finish, default is ``False``
|
| |
|
| |
- * `--send-mail` (optional): send mail to tag owners, default is `False`
|
| |
+ * ``--send-mail`` (optional): send mail to tag owners, default is ``False``
|
| |
|
| |
Example:
|
| |
|
| |
@@ -336,7 +349,7 @@
|
| |
"rebuild_strategy": "only-changed"
|
| |
}
|
| |
|
| |
- $ cat $PWD/ursa-major.json
|
| |
+ $ cat $PWD/ursa-major.json
|
| |
{
|
| |
"fedora-30-test-build": {
|
| |
"modules": [
|
| |
@@ -355,13 +368,14 @@
|
| |
$ ursa-major add-tag --wait-regen-repo --send-mail
|
| |
|
| |
In this example, Ursa-Major reads the module state change message from
|
| |
- enviroment variable `CI_MESSAGE`, the module build state name is "ready" and
|
| |
+ enviroment variable ``CI_MESSAGE``, the module build state name is "ready" and
|
| |
module is present under a tag "fedora-30-test-build" in tag config file.
|
| |
Ursa-Major will add the koji tag "module-testmodule-master-20181026165847-a5b0195c"
|
| |
into "fedora-30-test-build"'s inheritance, and then regen-repo for build tags
|
| |
- in "fedora-30-test-build"'s inheritance (refer to `add-module` for details of
|
| |
+ in "fedora-30-test-build"'s inheritance (refer to ``add-module`` for details of
|
| |
how to find build tags).
|
| |
|
| |
Ursa-Major will send mail to tag owners if run with "--send-mail", mail
|
| |
configuration can be configured in global config file or user config file,
|
| |
under the section of "mail".
|
| |
+
|
| |
Signed-off-by: Chenxiong Qi cqi@redhat.com