openSUSE-release-tools

ToTest-Manager

ToTest-Manager has two stages:

Both stages can run independently, but they communicate using the ToTestManagerStatus attribute to avoid races, like releasing a product while it’s being published or overwriting a product while it’s being tested. The releaser publish disables the test subproject before releasing a product.

Project Configuration

The configuration is stored in the ToTestManagerConfig attribute in YAML format.

Available options and their defaults are:

base: openSUSE # Defaults to the toplevel project name
test_subproject: ToTest
test_project: <project>:ToTest # Defaults to <project>:<test_subproject>
do_not_release: False # If set, publishing is a noop (and the releaser doesn't publish disable!)
set_snapshot_number: False
snapshot_number_prefix: Snapshot
take_source_from_product: False
arch: x86_64

# openQA settings
openqa_server: None # URL to the openQA server, e.g. "https://openqa.opensuse.org"
openqa_group: None # Name of the job group in openQA, e.g. "openSUSE Tumbleweed"
jobs_num: 42 # Minimum number of openQA jobs before publishing is possible

# Global defaults for products
product_repo: images
product_arch: local
livecd_repo: images
totest_container_repo: containers
totest_images_repo: images # Default: Same as product_repo.

products:
  (see below)

Product Configuration

Every ttm managed project has a list of products which are defined by following attributes:

To allow a simpler configuration for most common product types and backwards compatibility, there are various kinds of pre-defined product types:

The following product definitions are equivalent:

totest_images_repo: appliances
products:
  main:
  - foo:dvd
  ftp:
  - foo:ftp
  livecds:
  - livecd-foo:
    - x86_64
  image:
  - foo:kvm:
    - x86_64
  container:
  - foo-container-image:docker:
    - x86_64
  containerfile:
  - some-dockerfile:
    - x86_64
---
products:
  custom:
    # Implicit defaults for each custom product:
    # archs: [local]
    # build_prj: openSUSE:Factory
    # build_repo: images
    # needs_to_contain_product_version: false
    # max_size: None
    # release_prj: openSUSE:Factory:ToTest
    # release_repo: images
    # release_set_version: false
    # publish_using_release: false
    foo:dvd:
      max_size: 4700372992
      release_set_version: true
    foo:ftp:
      needs_to_contain_product_version: true
    livecd-foo:
      archs: [x86_64]
      release_set_version: true
      build_prj: openSUSE:Factory:Live
    foo:kvm:
      archs: [x86_64]
      release_set_version: true
      release_repo: appliances
    foo-container-image:docker:
      archs: [x86_64]
      release_repo: containers
      publish_using_release: true
    some-dockerfile:
      archs: [x86_64]
      build_repo: containerfile
      release_repo: containers
      publish_using_release: true

Every product can have multiple architectures defined, those are only used to check for build success before doing a release. If any of the listed architectures failed to build, a release is blocked.

OBS does not allow to release a multibuild container without all of its flavors, so mentioning a multibuild container itself can be used instead of listing all flavors explicitly. In that case, there is no check for build success for the individual flavors, unless they are listed in addition.

There is a check to ensure that every successful build in the product_repo maps to a product. If this is not the case, an error is printed and the release is blocked.

set_release

The set_release mechanism can be enabled products, in which case their build number is overwritten by snapshot_number_prefix + a number. If take_source_from_product is enabled, that number is taken from the first “main” product, or if there is none, the first “custom” product. If take_source_from_product is disabled, the 000release-packages:(base)-release package from the main project’s standard repo and arch is looked at.