From 2943fe76116094cda2a4dd27ee56fac3626d491c Mon Sep 17 00:00:00 2001 From: Itxaka Date: Fri, 26 Apr 2024 10:57:41 +0200 Subject: [PATCH] More options for enki outputs - Allow provided our own keys fi the create keys for ci is not set - Allow override the output type so we can generate test artifacts Signed-off-by: Itxaka --- Earthfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Earthfile b/Earthfile index 5f9dcbab0..aa695e5dd 100644 --- a/Earthfile +++ b/Earthfile @@ -330,14 +330,23 @@ uki-iso: ARG --required BASE_IMAGE # BASE_IMAGE is existing kairos image which needs to be converted to uki ARG ENKI_FLAGS ARG ENKI_CREATE_CI_KEYS # If set, it will create keys for the UKI image. Good for testing + ARG ENKI_OUTPUT_TYPE=iso # Set output type, iso, container, uki file FROM $OSBUILDER_IMAGE WORKDIR /build RUN mkdir -p /keys IF [ "$ENKI_CREATE_CI_KEYS" != "" ] RUN enki genkey -e 7 --output /keys Test + ELSE + COPY keys/ /keys + END + RUN --no-cache enki build-uki $BASE_IMAGE --output-dir /build/ -k /keys --output-type ${ENKI_OUTPUT_TYPE} ${ENKI_FLAGS} + IF [ "$ENKI_OUTPUT_TYPE" == "iso" ] + SAVE ARTIFACT /build/*.iso AS LOCAL build/ + ELSE IF [ "$ENKI_OUTPUT_TYPE" == "container" ] + SAVE ARTIFACT /build/*.tar AS LOCAL build/ + ELSE IF [ "$ENKI_OUTPUT_TYPE" == "uki" ] + SAVE ARTIFACT /build/*.efi AS LOCAL build/ END - RUN --no-cache enki build-uki $BASE_IMAGE --output-dir /build/ -k /keys --output-type iso ${ENKI_FLAGS} - SAVE ARTIFACT /build/*.iso AS LOCAL build/ # WARNING the following targets are just for development purposes, use them at your own risk