metadata: Allow creating internal releases
The internal flag in productmd is meant to indicate that a compose is not meant for publishing. This is potentially useful to allow filtering in PDC or similar service. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
e66d8dd190
commit
d3cad4795c
@ -68,6 +68,9 @@ Options
|
|||||||
**release_is_layered** = False
|
**release_is_layered** = False
|
||||||
(*bool*) -- typically False for an operating system, True otherwise
|
(*bool*) -- typically False for an operating system, True otherwise
|
||||||
|
|
||||||
|
**release_internal** = False
|
||||||
|
(*bool*) -- whether the compose is meant for public consumption
|
||||||
|
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
@ -399,6 +399,7 @@ def _make_schema():
|
|||||||
"default": "ga",
|
"default": "ga",
|
||||||
},
|
},
|
||||||
"release_is_layered": {"type": "boolean"},
|
"release_is_layered": {"type": "boolean"},
|
||||||
|
"release_internal": {"type": "boolean", "default": False},
|
||||||
"release_discinfo_description": {"type": "string"},
|
"release_discinfo_description": {"type": "string"},
|
||||||
|
|
||||||
"base_product_name": {"type": "string"},
|
"base_product_name": {"type": "string"},
|
||||||
|
@ -47,6 +47,7 @@ def get_compose_dir(topdir, conf, compose_type="production", compose_date=None,
|
|||||||
ci.release.version = conf["release_version"]
|
ci.release.version = conf["release_version"]
|
||||||
ci.release.is_layered = bool(conf.get("release_is_layered", False))
|
ci.release.is_layered = bool(conf.get("release_is_layered", False))
|
||||||
ci.release.type = conf.get("release_type", "ga").lower()
|
ci.release.type = conf.get("release_type", "ga").lower()
|
||||||
|
ci.release.internal = bool(conf.get("release_internal", False))
|
||||||
if ci.release.is_layered:
|
if ci.release.is_layered:
|
||||||
ci.base_product.name = conf["base_product_name"]
|
ci.base_product.name = conf["base_product_name"]
|
||||||
ci.base_product.short = conf["base_product_short"]
|
ci.base_product.short = conf["base_product_short"]
|
||||||
|
@ -79,6 +79,7 @@ def compose_to_composeinfo(compose):
|
|||||||
ci.release.short = compose.conf["release_short"]
|
ci.release.short = compose.conf["release_short"]
|
||||||
ci.release.is_layered = compose.conf["release_is_layered"]
|
ci.release.is_layered = compose.conf["release_is_layered"]
|
||||||
ci.release.type = compose.conf["release_type"].lower()
|
ci.release.type = compose.conf["release_type"].lower()
|
||||||
|
ci.release.internal = bool(compose.conf["release_internal"])
|
||||||
|
|
||||||
# base product
|
# base product
|
||||||
if ci.release.is_layered:
|
if ci.release.is_layered:
|
||||||
|
@ -226,6 +226,7 @@ class ComposeTestCase(unittest.TestCase):
|
|||||||
release_short='test',
|
release_short='test',
|
||||||
release_type='ga',
|
release_type='ga',
|
||||||
release_is_layered=False,
|
release_is_layered=False,
|
||||||
|
release_internal=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
compose = Compose(conf, self.tmp_dir)
|
compose = Compose(conf, self.tmp_dir)
|
||||||
@ -266,6 +267,7 @@ class ComposeTestCase(unittest.TestCase):
|
|||||||
release_short='test',
|
release_short='test',
|
||||||
release_type='ga',
|
release_type='ga',
|
||||||
release_is_layered=False,
|
release_is_layered=False,
|
||||||
|
release_internal=False,
|
||||||
tree_arches=['x86_64'],
|
tree_arches=['x86_64'],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -310,6 +312,7 @@ class ComposeTestCase(unittest.TestCase):
|
|||||||
release_short='test',
|
release_short='test',
|
||||||
release_type='ga',
|
release_type='ga',
|
||||||
release_is_layered=False,
|
release_is_layered=False,
|
||||||
|
release_internal=False,
|
||||||
tree_variants=['Server', 'Client', 'Server-Gluster'],
|
tree_variants=['Server', 'Client', 'Server-Gluster'],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -347,6 +350,7 @@ class ComposeTestCase(unittest.TestCase):
|
|||||||
release_short='test',
|
release_short='test',
|
||||||
release_type='ga',
|
release_type='ga',
|
||||||
release_is_layered=False,
|
release_is_layered=False,
|
||||||
|
release_internal=False,
|
||||||
tree_variants=['Server', 'Client', 'Server-optional'],
|
tree_variants=['Server', 'Client', 'Server-optional'],
|
||||||
tree_arches=['x86_64'],
|
tree_arches=['x86_64'],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user