Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 5 additions & 9 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,12 @@ jobs:
persist-credentials: false

- uses: docker/setup-docker-action@1a6edb0ba9ac496f6850236981f15d8f9a82254d # v5.0.0
id: setup-docker
with:
version: 29.2.1
daemon-config: |
{
"features": {
"containerd-snapshotter": false
}
}

- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0

- run: make install-diffoci install-crane k3s-setup
- run: sudo apt install -y libgpgme-dev libassuan-dev libbtrfs-dev pkg-config # skopeo dependencies
- run: make install-diffoci install-skopeo k3s-setup
- run: make ${{ matrix.make-target }}
env:
DOCKER_HOST: ${{ steps.setup-docker.outputs.sock }}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ install-diffoci:
go mod vendor && \
go install

.PHONY: install-crane
install-crane:
@ GOFLAGS="" go install github.com/google/go-containerregistry/cmd/crane@latest
.PHONY: install-skopeo
install-skopeo:
@ GOFLAGS="" go install github.com/containers/skopeo/cmd/skopeo@latest

.PHONY: k3s-setup
k3s-setup:
Expand Down
16 changes: 14 additions & 2 deletions integration/dockerfiles/Dockerfile_test_issue_mz155
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,20 @@ RUN stat /tmp/testdir \

# assert that snapshot did not touch atime. we can't use diffoci for that,
# as buildkit does not snapshot atime, they are only present during build.
RUN [ $(stat -c %X /tmp/testdir) -eq $(date -d '2000-01-01' +%s) ] \
&& [ $(stat -c %X /tmp/testdir) -eq $(date -d '2000-01-01' +%s) ]
# starting with docker v29 buildkit, when using containerd snapshotter,
# snapshotter will modifity atime on snapshot and can therefore no longer be tested.
RUN if ls -l /proc/1/exe | grep -q '/kaniko/executor'; then \
if [ $(stat -c %X /tmp/testdir) -ne $(date -d '2000-01-01' +%s) ]; then \
echo "FAIL: atime changed on /tmp/testdir"; \
exit 1; \
fi; \
if [ $(stat -c %X /tmp/testdir/file.txt) -ne $(date -d '2000-01-01' +%s) ]; then \
echo "FAIL: atime changed /tmp/testdir/file.txt"; \
exit 1; \
fi; \
else \
echo "PID1 is not Kaniko, skipping check"; \
fi

FROM debian:12.10 AS second-image

Expand Down
8 changes: 8 additions & 0 deletions integration/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,13 @@ func (d *DockerFileBuilder) BuildDockerImage(t *testing.T, imageRepo, dockerfile
return fmt.Errorf("failed to build image %s with docker command \"%s\": %w %s", dockerImage, dockerCmd.Args, err, string(out))
}
t.Logf("Build image for Dockerfile %s as %s. docker build output: %s \n", dockerfile, dockerImage, out)
// mz507: push is kept as a separate step because Dockerfile_test_issue_519
// still uses legacy builder and not buildkit
pushCmd := exec.Command("docker", "push", dockerImage)
out, err = RunCommandWithoutTest(pushCmd)
if err != nil {
return fmt.Errorf("failed to push image %s with docker command \"%s\": %w %s", dockerImage, pushCmd.Args, err, string(out))
}
return nil
}

Expand Down Expand Up @@ -614,6 +621,7 @@ func (d *DockerFileBuilder) buildRelativePathsImage(logf logger, imageRepo, dock
dockerCmd := exec.Command("docker",
[]string{
"build",
"--push",
"-t", dockerImage,
"-f", dockerfile,
"./context",
Expand Down
Loading
Loading