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

Commit

Permalink
Converge dockerfile for tests
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <itxaka@kairos.io>
  • Loading branch information
Itxaka committed Jul 30, 2024
1 parent 5d1dbb7 commit 186f21a
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 67 deletions.
10 changes: 1 addition & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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
Expand Down
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
Expand Up @@ -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).
Expand Down

0 comments on commit 186f21a

Please sign in to comment.