cki_tools.update_ystream_composes

Manage the y-stream composes for trees in kpet-db

Usage

usage: python3 -m cki_tools.update_ystream_composes.py [-h]
                                  [--config CONFIG]
                                  [--config-path CONFIG_PATH]
                                  [--kpet-db KPET_DB]
                                  {update,tag,validate} ...

Manage y-stream trees in kpet-db.

positional arguments:
  {update,tag}
    update              update compose selection
    tag                 synchronize tag in CTS
    validate            validate the configuration

options:
  -h, --help            show this help message and exit
  --config CONFIG       YAML y-stream compose configuration file to use
  --config-path CONFIG_PATH
                        path to YAML y-stream compose configuration file
  --kpet-db KPET_DB     path to kpet-db

tagging via action=tag:

usage: python3 -m cki_tools.update_ystream_composes.py [-h] tag
                                  [--user-data USER_DATA] tag

positional arguments:
  tag                   name of tag to synchronize

options:
  --user-data USER_DATA
                        description for compose change history

Updating y-stream composes in kpet-db

$ cat trees/rhel9.j2
...
{% set distro_name = "RHEL-9.4.0-20231008.18" %}
{% set buildroot_name = "BUILDROOT-9.4.0-RHEL-9-20231008.22" %}
...
$ export CTS_URL=https://cts.host
$ python3 -m cki_tools.update_ystream_composes --config-path ystream_composes.yaml
$ cat trees/rhel9.j2
...
{% set distro_name = "RHEL-9.4.0-20231016.19" %}
{% set buildroot_name = "BUILDROOT-9.4.0-RHEL-9-20231016.25" %}
...

Synchronizing a CTS tag with the used composes

$ kinit user@REALM
$ export CTS_URL=https://cts.host
$ export CKI_DEPLOYMENT_ENVIRONMENT=production
$ export CKI_LOGGING_LEVEL=INFO
$ python3 -m cki_tools.update_ystream_composes \
  tag some-tag \
  --user-data "update to match kpet-db"
2024-08-07T09:02:21.732000 - [INFO] - cki.cki_tools.update_ystream_composes - Adding some-tag to Fedora-ELN-20240804.0

Configuration via environment variables

The following variables need to be defined:

Name Type Secret Required Description
YSTREAM_COMPOSES_CONFIG yaml no no Configuration in YAML. If not present, falls back to YSTREAM_COMPOSES_CONFIG_PATH
YSTREAM_COMPOSES_CONFIG_PATH path no no Path to the configuration YAML file
CTS_URL url no yes URL of the compose tracking service
CKI_DEPLOYMENT_ENVIRONMENT string no no Define the deployment environment (production/staging)
CKI_LOGGING_LEVEL string no no logging level for CKI modules, defaults to WARN; to get meaningful output on the command line, set to INFO
SENTRY_DSN url yes no Sentry DSN