diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 7afb52f..df47b30 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -45,7 +45,7 @@ jobs: insecure = true EOF - earthly -P +iso --KCRYPT_DEV=true + earthly -P +iso --KCRYPT_DEV=true --IMMUCORE_DEV=true - uses: actions/upload-artifact@v3 with: name: challenger.iso.zip diff --git a/Earthfile b/Earthfile index 5d69826..4bcf731 100644 --- a/Earthfile +++ b/Earthfile @@ -22,6 +22,21 @@ image: RUN rm /usr/bin/kcrypt COPY github.com/kairos-io/kcrypt:$KCRYPT_DEV_BRANCH+build-kcrypt/kcrypt /usr/bin/kcrypt END + ARG IMMUCORE_DEV + ARG IMMUCORE_DEV_BRANCH=master + IF [ "$IMMUCORE_DEV" = "true" ] + RUN rm -Rf /usr/lib/dracut/modules.d/28immucore + RUN rm /etc/dracut.conf.d/10-immucore.conf + RUN rm /etc/dracut.conf.d/02-kairos-setup-initramfs.conf || exit 0 + RUN rm /etc/dracut.conf.d/50-kairos-initrd.conf || exit 0 + COPY github.com/kairos-io/immucore:$IMMUCORE_DEV_BRANCH+build-immucore/immucore /usr/bin/immucore + COPY github.com/kairos-io/immucore:$IMMUCORE_DEV_BRANCH+dracut-artifacts/28immucore /usr/lib/dracut/modules.d/28immucore + COPY github.com/kairos-io/immucore:$IMMUCORE_DEV_BRANCH+dracut-artifacts/10-immucore.conf /etc/dracut.conf.d/10-immucore.conf + # Need to rerun dracut so the updated binaries get in the initramfs + RUN --no-cache kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}" + RUN --no-cache kernel=$(ls /lib/modules | head -n1) && dracut -f "/boot/initrd-${kernel}" "${kernel}" && ln -sf "initrd-${kernel}" /boot/initrd + END + # END COPY +build-challenger/kcrypt-discovery-challenger /system/discovery/kcrypt-discovery-challenger SAVE IMAGE $IMAGE