Add OCP building back
This commit is contained in:
parent
816e4a69e9
commit
afb3576a3d
@ -107,7 +107,8 @@ ALLOWED_TYPE_VARIANTS = {
|
|||||||
"Container": ["Base", "Minimal", "UBI"],
|
"Container": ["Base", "Minimal", "UBI"],
|
||||||
"EC2": None,
|
"EC2": None,
|
||||||
"GenericCloud": None,
|
"GenericCloud": None,
|
||||||
"Vagrant": ["Libvirt", "Vbox"]
|
"Vagrant": ["Libvirt", "Vbox"],
|
||||||
|
"OCP": None
|
||||||
}
|
}
|
||||||
def valid_type_variant(_type: str, variant: str="") -> bool:
|
def valid_type_variant(_type: str, variant: str="") -> bool:
|
||||||
if _type not in ALLOWED_TYPE_VARIANTS:
|
if _type not in ALLOWED_TYPE_VARIANTS:
|
||||||
|
@ -107,7 +107,7 @@ class ImageBuild:
|
|||||||
["tar", "-C", f"{self.outdir}", "--strip-components=1", "-x", "-f", lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", "*/layer.tar"],
|
["tar", "-C", f"{self.outdir}", "--strip-components=1", "-x", "-f", lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", "*/layer.tar"],
|
||||||
["xz", f"{self.outdir}/layer.tar"]
|
["xz", f"{self.outdir}/layer.tar"]
|
||||||
]
|
]
|
||||||
if self.image_type in ["GenericCloud"]:
|
if self.image_type in ["GenericCloud", "OCP"]:
|
||||||
self.stage_commands = [
|
self.stage_commands = [
|
||||||
["qemu-img", "convert", "-c", "-f", "raw", "-O", "qcow2", lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", f"{self.outdir}/{self.outname}.qcow2"]
|
["qemu-img", "convert", "-c", "-f", "raw", "-O", "qcow2", lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", f"{self.outdir}/{self.outname}.qcow2"]
|
||||||
]
|
]
|
||||||
@ -283,7 +283,7 @@ class ImageBuild:
|
|||||||
def package(self) -> int:
|
def package(self) -> int:
|
||||||
# Some build types don't need to be packaged by imagefactory
|
# Some build types don't need to be packaged by imagefactory
|
||||||
# @TODO remove business logic if possible
|
# @TODO remove business logic if possible
|
||||||
if self.image_type in ["GenericCloud", "EC2", "Azure", "Vagrant"]:
|
if self.image_type in ["GenericCloud", "EC2", "Azure", "Vagrant", "OCP"]:
|
||||||
self.target_uuid = self.base_uuid if hasattr(self, 'base_uuid') else ""
|
self.target_uuid = self.base_uuid if hasattr(self, 'base_uuid') else ""
|
||||||
|
|
||||||
if self.target_uuid:
|
if self.target_uuid:
|
||||||
|
Loading…
Reference in New Issue
Block a user