mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-20 09:49:11 +00:00
art: Simplify repository handling (#170)
Don't track here the toolkit repository, consume internal packages only
This commit is contained in:
committed by
Itxaka
parent
9e68fa24ae
commit
e09f429703
49
Earthfile
49
Earthfile
@@ -6,12 +6,7 @@ ARG IMAGE=quay.io/kairos/${VARIANT}-${FLAVOR}:latest
|
|||||||
ARG ISO_NAME=kairos-${VARIANT}-${FLAVOR}
|
ARG ISO_NAME=kairos-${VARIANT}-${FLAVOR}
|
||||||
ARG LUET_VERSION=0.32.4
|
ARG LUET_VERSION=0.32.4
|
||||||
ARG OS_ID=kairos
|
ARG OS_ID=kairos
|
||||||
|
ARG REPOSITORIES_FILE=repositories.yaml
|
||||||
IF [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "tumbleweed" ] || [ "$FLAVOR" = "ubuntu" ] || [ "$FLAVOR" = "rockylinux" ]
|
|
||||||
ARG REPOSITORIES_FILE=repositories.yaml.${FLAVOR}
|
|
||||||
ELSE
|
|
||||||
ARG REPOSITORIES_FILE=repositories.yaml
|
|
||||||
END
|
|
||||||
|
|
||||||
ARG COSIGN_SKIP=".*quay.io/kairos/.*"
|
ARG COSIGN_SKIP=".*quay.io/kairos/.*"
|
||||||
|
|
||||||
@@ -153,36 +148,28 @@ framework:
|
|||||||
|
|
||||||
ENV USER=root
|
ENV USER=root
|
||||||
|
|
||||||
IF [ "$WITH_KERNEL" = "true" ] || [ "$FLAVOR" = "alpine" ] || [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ] || [ "$FLAVOR" = "alpine-arm-rpi" ]
|
IF [ "$FLAVOR" != "ubuntu" ] && [ "$FLAVOR" != "opensuse" ] && [ "$FLAVOR" != "fedora" ]
|
||||||
RUN /usr/bin/luet install -y --system-target /framework \
|
ARG TOOLKIT_IMG="opensuse"
|
||||||
meta/cos-verify \
|
|
||||||
meta/cos-core \
|
|
||||||
cloud-config/recovery \
|
|
||||||
cloud-config/live \
|
|
||||||
cloud-config/network \
|
|
||||||
cloud-config/boot-assessment \
|
|
||||||
cloud-config/rootfs \
|
|
||||||
system-openrc/cos-setup \
|
|
||||||
system/kernel \
|
|
||||||
system/dracut-initrd
|
|
||||||
ELSE
|
ELSE
|
||||||
RUN /usr/bin/luet install -y --system-target /framework \
|
ARG TOOLKIT_IMG="$FLAVOR"
|
||||||
meta/cos-verify \
|
|
||||||
meta/cos-core \
|
|
||||||
cloud-config/recovery \
|
|
||||||
cloud-config/live \
|
|
||||||
cloud-config/boot-assessment \
|
|
||||||
cloud-config/network \
|
|
||||||
cloud-config/rootfs
|
|
||||||
END
|
END
|
||||||
|
|
||||||
RUN /usr/bin/luet install -y --system-target /framework system/shim system/grub2-efi
|
RUN luet install -y --system-target /framework \
|
||||||
|
system/elemental-toolkit-$TOOLKIT_IMG
|
||||||
|
|
||||||
# Replace elemental from kairos repo
|
IF [ "$WITH_KERNEL" = "true" ] || [ "$FLAVOR" = "alpine" ] || [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ] || [ "$FLAVOR" = "alpine-arm-rpi" ]
|
||||||
# TODO: consume toolkit from kairos and drop this workaround
|
RUN luet install -y --system-target /framework \
|
||||||
RUN /usr/bin/luet install --force --system-target /framework -y system/elemental-cli
|
distro-kernels/opensuse distro-initrd/opensuse
|
||||||
|
END
|
||||||
|
|
||||||
RUN /usr/bin/luet cleanup --system-target /framework
|
# Required for Secure boot
|
||||||
|
RUN luet install -y --system-target /framework system/shim system/grub2-efi
|
||||||
|
# Elemental CLI
|
||||||
|
RUN luet install -y --system-target /framework system/elemental-cli
|
||||||
|
|
||||||
|
COPY +luet/luet /framework/usr/bin/luet
|
||||||
|
|
||||||
|
RUN luet cleanup --system-target /framework
|
||||||
COPY overlay/files /framework
|
COPY overlay/files /framework
|
||||||
RUN rm -rf /framework/var/luet
|
RUN rm -rf /framework/var/luet
|
||||||
RUN rm -rf /framework/var/cache
|
RUN rm -rf /framework/var/cache
|
||||||
|
Reference in New Issue
Block a user