compress genericcloud and vagrant images by default

* add azure support
* use download.r.o url
This commit is contained in:
Neil Hanlon 2022-07-10 21:56:52 -04:00
parent 193c3f9b73
commit 1f94680924
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
3 changed files with 6 additions and 6 deletions

View File

@ -57,7 +57,7 @@ RUN rm -rf /etc/yum.repos.d/*.repo /get_arch
RUN pip install awscli RUN pip install awscli
ENV BRANCH r9 ARG BRANCH r9
RUN git clone https://git.resf.org/sig_core/kickstarts.git --branch $BRANCH /kickstarts RUN git clone https://git.resf.org/sig_core/kickstarts.git --branch $BRANCH /kickstarts
RUN pip install 'git+https://git.resf.org/sig_core/toolkit.git@devel#egg=empanadas&subdirectory=iso/empanadas' RUN pip install 'git+https://git.resf.org/sig_core/toolkit.git@devel#egg=empanadas&subdirectory=iso/empanadas'

View File

@ -100,7 +100,7 @@ class ImageBuild:
] ]
if self.image_type in ["GenericCloud"]: if self.image_type in ["GenericCloud"]:
self.stage_commands = [ self.stage_commands = [
["qemu-img", "convert", "-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"]
] ]
if self.image_type in ["EC2"]: if self.image_type in ["EC2"]:
self.stage_commands = [ self.stage_commands = [
@ -120,7 +120,7 @@ class ImageBuild:
} }
output = f"{_map[self.variant]}" #type: ignore output = f"{_map[self.variant]}" #type: ignore
self.stage_commands = [ self.stage_commands = [
["qemu-img", "convert", "-f", "raw", "-O", output, lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", f"{self.outdir}/{self.outname}.{output}"] ["qemu-img", "convert", "-c", "-f", "raw", "-O", output, lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", f"{self.outdir}/{self.outname}.{output}"]
] ]
@ -174,7 +174,7 @@ class ImageBuild:
args = [] args = []
if self.image_type == "Container": if self.image_type == "Container":
args = ["--parameter", "offline_icicle", "true"] args = ["--parameter", "offline_icicle", "true"]
if self.image_type in ["GenericCloud", "EC2"]: if self.image_type in ["GenericCloud", "EC2", "Vagrant", "Azure"]:
args = ["--parameter", "generate_icicle", "false"] args = ["--parameter", "generate_icicle", "false"]
return args return args
@ -354,7 +354,7 @@ class ImageBuild:
log_lines("Command STDERR", stderr) log_lines("Command STDERR", stderr)
def fix_ks(self): def fix_ks(self):
self.runCmd(["sed", "-i", f"s,$basearch,{self.architecture.name},", self.kickstart_arg[-1]]) self.runCmd(["sed", "-i", f"s,$basearch,{self.architecture.name},", self.kickstart_arg[-1]], search=False)
def render_kubernetes_job(self): def render_kubernetes_job(self):
commands = [self.build_command(), self.package_command(), self.copy_command()] commands = [self.build_command(), self.package_command(), self.copy_command()]

View File

@ -5,7 +5,7 @@
<version>{{minor}}</version> <version>{{minor}}</version>
<arch>{{architecture}}</arch> <arch>{{architecture}}</arch>
<install type='url'> <install type='url'>
<url>https://dl.rockylinux.org/stg/rocky/{{major}}/BaseOS/{{architecture}}/{{installdir}}</url> <url>https://download.rockylinux.org/pub/rocky/{{major}}/BaseOS/{{architecture}}/{{installdir}}</url>
</install> </install>
<icicle> <icicle>
<extra_command>rpm -qa --qf '%{NAME},%{VERSION},%{RELEASE},%{ARCH},%{EPOCH},%{SIZE},%{SIGMD5},%{BUILDTIME} <extra_command>rpm -qa --qf '%{NAME},%{VERSION},%{RELEASE},%{ARCH},%{EPOCH},%{SIZE},%{SIGMD5},%{BUILDTIME}