From 472f79f08e2fbb0fcc07abbe6fed221e18a4f36f Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 22 Jun 2022 13:21:45 +0200 Subject: test/testvol: move Containerfile into testvol dir I think it is confusion to have this Containerfile in the repo root. It is used for the tests only so we should move it into the same dir. Also adapt the Makefile target to use the new path and add the current date as tag instead of using latest which can break CI easily when we have to update the image. Signed-off-by: Paul Holzinger --- Containerfile-testvol | 10 ---------- Makefile | 4 ++-- test/testvol/Containerfile | 10 ++++++++++ 3 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 Containerfile-testvol create mode 100644 test/testvol/Containerfile diff --git a/Containerfile-testvol b/Containerfile-testvol deleted file mode 100644 index 6ff45064b..000000000 --- a/Containerfile-testvol +++ /dev/null @@ -1,10 +0,0 @@ -FROM golang:1.15-alpine AS build-img -COPY ./test/testvol/ /go/src/github.com/containers/podman/cmd/testvol/ -COPY ./vendor /go/src/github.com/containers/podman/vendor/ -WORKDIR /go/src/github.com/containers/podman -RUN go build -o /testvol ./cmd/testvol - -FROM alpine -COPY --from=build-img /testvol /usr/local/bin -WORKDIR / -ENTRYPOINT ["/usr/local/bin/testvol"] diff --git a/Makefile b/Makefile index 38ea7a256..4d60ad4c8 100644 --- a/Makefile +++ b/Makefile @@ -227,9 +227,9 @@ test/checkseccomp/checkseccomp: $(wildcard test/checkseccomp/*.go) test/testvol/testvol: $(wildcard test/testvol/*.go) $(GOCMD) build $(BUILDFLAGS) $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' -o $@ ./test/testvol -.PHONY: volume-plugin-test-image +.PHONY: volume-plugin-test-img volume-plugin-test-img: - podman build -t quay.io/libpod/volume-plugin-test-img -f Containerfile-testvol . + podman build -t quay.io/libpod/volume-plugin-test-img:$$(date +%Y%m%d) -f ./test/testvol/Containerfile . .PHONY: test/goecho/goecho test/goecho/goecho: $(wildcard test/goecho/*.go) diff --git a/test/testvol/Containerfile b/test/testvol/Containerfile new file mode 100644 index 000000000..6ff45064b --- /dev/null +++ b/test/testvol/Containerfile @@ -0,0 +1,10 @@ +FROM golang:1.15-alpine AS build-img +COPY ./test/testvol/ /go/src/github.com/containers/podman/cmd/testvol/ +COPY ./vendor /go/src/github.com/containers/podman/vendor/ +WORKDIR /go/src/github.com/containers/podman +RUN go build -o /testvol ./cmd/testvol + +FROM alpine +COPY --from=build-img /testvol /usr/local/bin +WORKDIR / +ENTRYPOINT ["/usr/local/bin/testvol"] -- cgit v1.2.3-54-g00ecf