Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Add bootable test for enki UKI generated isos #146

Merged
merged 4 commits into from
Jul 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Converge dockerfile for tests
Signed-off-by: Itxaka <itxaka@kairos.io>
  • Loading branch information
Itxaka committed Jul 31, 2024
commit 73423d96c97f8dc16f8284f1b8696bca756b1546
10 changes: 1 addition & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -41,12 +41,4 @@ RUN dnf install -y binutils mtools efitools shim openssl dosfstools xorriso rsyn

COPY --from=builder /enki /enki

ENTRYPOINT ["/enki"]

FROM gcr.io/kaniko-project/executor:latest

COPY --from=builder /enki /enki

ENTRYPOINT ["/enki"]

CMD ["convert"]
ENTRYPOINT ["/enki"]
3 changes: 1 addition & 2 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -4,14 +4,13 @@ VERSION 0.7
ARG --global GO_VERSION=1.22-bookworm

enki-image:
FROM DOCKERFILE -f e2e/assets/Dockerfile.enki e2e/assets/
FROM DOCKERFILE -f Dockerfile .

SAVE IMAGE enki-image

go-deps:
ARG GO_VERSION
FROM golang:$GO_VERSION
RUN apt-get update && apt-get install -y rsync gcc bash git jq docker
WORKDIR /build
COPY go.mod go.sum . # This will make the go mod download able to be cached as long as it hasnt change
RUN go mod download
21 changes: 0 additions & 21 deletions e2e/assets/Dockerfile.enki

This file was deleted.

16 changes: 0 additions & 16 deletions e2e/assets/luet-amd64.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions e2e/assets/luet-arm64.yaml

This file was deleted.

4 changes: 1 addition & 3 deletions e2e/suite_test.go
Original file line number Diff line number Diff line change
@@ -27,17 +27,15 @@ func NewEnki(image string, dirs ...string) *Enki {
tmpDir, err := os.MkdirTemp("", "enki-e2e-tmp")
Expect(err).ToNot(HaveOccurred())
enkiBinary := path.Join(tmpDir, "enki")

compileEnki(enkiBinary)

return &Enki{ContainerImage: image, Path: enkiBinary, Dirs: dirs}
}

// enki relies on various external binaries. To make sure those dependencies
// are in place (or to test the behavior of enki when they are not), we run enki
// in a container using this function.
func (e *Enki) Run(enkiArgs ...string) (string, error) {
return e.ContainerRun("/bin/enki", enkiArgs...)
return e.ContainerRun(e.Path, enkiArgs...)
}

// We need --privileged for `mount` to work in the container (used in the build_uki_test.go).