From 3088df8e60a06d8d4c4fadd3c52b1045c0cb00b0 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Mon, 23 Oct 2017 23:52:57 +0200 Subject: [PATCH] checks: Use list of release types from productmd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's not duplicate the list. Productmd exports a list of valid values, so Pungi should just pick and use that. Closes: https://pagure.io/pungi/pull-request/773 Signed-off-by: Lubomír Sedlář --- doc/configuration.rst | 6 ++++-- pungi/checks.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index 76b03a1a..d0caacbc 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -62,8 +62,10 @@ Options **release_version** [mandatory] (*str*) -- release version -**release_type** = "ga" - (*str*) -- release type, "ga" or "updates" +**release_type** = "ga" (*str*) -- release type, for example ``ga``, + ``updates`` or ``updates-testing``. See `list of all valid values + `_ + in productmd documentation. **release_is_layered** = False (*bool*) -- typically False for an operating system, True otherwise diff --git a/pungi/checks.py b/pungi/checks.py index 3a68ef9d..f7c5c1af 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -44,6 +44,7 @@ import re import jsonschema import six from kobo.shortcuts import force_list +from productmd.common import RELEASE_TYPES from productmd.composeinfo import COMPOSE_TYPES import multiprocessing @@ -520,7 +521,7 @@ def make_schema(): "release_version": {"type": "string"}, "release_type": { "type": "string", - "enum": ["fast", "ga", "updates", "eus", "aus", "els"], + "enum": RELEASE_TYPES, "default": "ga", }, "release_is_layered": {"type": "boolean"},