nomacboot option for livemedia koji tasks

Merges: https://pagure.io/pungi/pull-request/1591
Signed-off-by: Christopher O'Brien <cobrien@redhat.com>
This commit is contained in:
Christopher O'Brien 2022-03-03 13:54:12 -05:00 committed by Lubomír Sedlář
parent 903ab076ba
commit d55770898c
6 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View File

@ -11,6 +11,7 @@ tests/data/repo-krb5-lookaside
tests/_composes tests/_composes
htmlcov/ htmlcov/
.coverage .coverage
.eggs
.idea/ .idea/
.tox .tox
.venv .venv

View File

@ -1451,6 +1451,7 @@ Live Media Settings
* ``repo`` (*str|[str]*) -- repos specified by URL or variant UID * ``repo`` (*str|[str]*) -- repos specified by URL or variant UID
* ``title`` (*str*) * ``title`` (*str*)
* ``install_tree_from`` (*str*) -- variant to take install tree from * ``install_tree_from`` (*str*) -- variant to take install tree from
* ``nomacboot`` (*bool*)
Image Build Settings Image Build Settings

View File

@ -981,6 +981,7 @@ def make_schema():
"arches": {"$ref": "#/definitions/list_of_strings"}, "arches": {"$ref": "#/definitions/list_of_strings"},
"failable": {"$ref": "#/definitions/list_of_strings"}, "failable": {"$ref": "#/definitions/list_of_strings"},
"release": {"$ref": "#/definitions/optional_string"}, "release": {"$ref": "#/definitions/optional_string"},
"nomacboot": {"type": "boolean"},
}, },
"required": ["name", "kickstart"], "required": ["name", "kickstart"],
"additionalProperties": False, "additionalProperties": False,

View File

@ -71,6 +71,7 @@ class LiveMediaPhase(PhaseLoggerMixin, ImageConfigMixin, ConfigGuardedPhase):
"ksurl": self.get_ksurl(image_conf), "ksurl": self.get_ksurl(image_conf),
"ksversion": image_conf.get("ksversion"), "ksversion": image_conf.get("ksversion"),
"scratch": image_conf.get("scratch", False), "scratch": image_conf.get("scratch", False),
"nomacboot": image_conf.get("nomacboot", False),
"release": self.get_release(image_conf), "release": self.get_release(image_conf),
"skip_tag": image_conf.get("skip_tag"), "skip_tag": image_conf.get("skip_tag"),
"name": name, "name": name,

View File

@ -391,6 +391,9 @@ class KojiWrapper(object):
if "can_fail" in options: if "can_fail" in options:
cmd.append("--can-fail=%s" % ",".join(options["can_fail"])) cmd.append("--can-fail=%s" % ",".join(options["can_fail"]))
if options.get("nomacboot"):
cmd.append("--nomacboot")
if wait: if wait:
cmd.append("--wait") cmd.append("--wait")

View File

@ -60,6 +60,7 @@ class TestLiveMediaPhase(PungiTestCase):
"version": "Rawhide", "version": "Rawhide",
"subvariant": "Server", "subvariant": "Server",
"failable_arches": [], "failable_arches": [],
"nomacboot": False,
}, },
) )
) )
@ -116,6 +117,7 @@ class TestLiveMediaPhase(PungiTestCase):
"version": "Rawhide", "version": "Rawhide",
"subvariant": "Server", "subvariant": "Server",
"failable_arches": ["amd64", "x86_64"], "failable_arches": ["amd64", "x86_64"],
"nomacboot": False,
}, },
) )
) )
@ -178,6 +180,7 @@ class TestLiveMediaPhase(PungiTestCase):
"version": "Rawhide", "version": "Rawhide",
"subvariant": "Server", "subvariant": "Server",
"failable_arches": [], "failable_arches": [],
"nomacboot": False,
}, },
) )
), ),
@ -201,6 +204,7 @@ class TestLiveMediaPhase(PungiTestCase):
"version": "Rawhide", "version": "Rawhide",
"subvariant": "Server", "subvariant": "Server",
"failable_arches": [], "failable_arches": [],
"nomacboot": False,
}, },
) )
), ),
@ -224,6 +228,7 @@ class TestLiveMediaPhase(PungiTestCase):
"version": "25", "version": "25",
"subvariant": "Server", "subvariant": "Server",
"failable_arches": [], "failable_arches": [],
"nomacboot": False,
}, },
) )
), ),
@ -286,6 +291,7 @@ class TestLiveMediaPhase(PungiTestCase):
"version": "Rawhide", "version": "Rawhide",
"subvariant": "Server", "subvariant": "Server",
"failable_arches": [], "failable_arches": [],
"nomacboot": False,
}, },
) )
), ),
@ -309,6 +315,7 @@ class TestLiveMediaPhase(PungiTestCase):
"version": "Rawhide", "version": "Rawhide",
"subvariant": "Server", "subvariant": "Server",
"failable_arches": [], "failable_arches": [],
"nomacboot": False,
}, },
) )
), ),
@ -332,6 +339,7 @@ class TestLiveMediaPhase(PungiTestCase):
"version": "25", "version": "25",
"subvariant": "Server", "subvariant": "Server",
"failable_arches": [], "failable_arches": [],
"nomacboot": False,
}, },
) )
), ),
@ -423,6 +431,7 @@ class TestLiveMediaPhase(PungiTestCase):
"install_tree_from": "Server-optional", "install_tree_from": "Server-optional",
"subvariant": "Something", "subvariant": "Something",
"failable": ["*"], "failable": ["*"],
"nomacboot": True,
} }
] ]
} }
@ -436,6 +445,7 @@ class TestLiveMediaPhase(PungiTestCase):
phase.run() phase.run()
self.assertTrue(phase.pool.add.called) self.assertTrue(phase.pool.add.called)
self.assertEqual( self.assertEqual(
phase.pool.queue_put.call_args_list, phase.pool.queue_put.call_args_list,
[ [
@ -464,6 +474,7 @@ class TestLiveMediaPhase(PungiTestCase):
"version": "25", "version": "25",
"subvariant": "Something", "subvariant": "Something",
"failable_arches": ["x86_64"], "failable_arches": ["x86_64"],
"nomacboot": True,
}, },
) )
) )