diff --git a/dockerfiles/ubuntu/Dockerfile b/Dockerfile similarity index 100% rename from dockerfiles/ubuntu/Dockerfile rename to Dockerfile diff --git a/README.md b/README.md index 854d908..526b0f1 100644 --- a/README.md +++ b/README.md @@ -329,11 +329,10 @@ environment is consistent across any `docker` enabled platform. When the docker image builds, the test are run inside the docker container, on failure they will stop the build. -Run the tests with the following commands for both `alpine` and `ubuntu` images: +Run the tests with the following command: ```sh -docker build -t semver-resource --target tests -f dockerfiles/alpine/Dockerfile . -docker build -t semver-resource --target tests -f dockerfiles/ubuntu/Dockerfile . +docker build -t semver-resource --target tests --build-arg base_image=paketobuildpacks/run-jammy-base:latest . ``` ### Integration tests diff --git a/dockerfiles/alpine/Dockerfile b/dockerfiles/alpine/Dockerfile deleted file mode 100644 index ee14992..0000000 --- a/dockerfiles/alpine/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -ARG base_image=alpine:latest -ARG builder_image=concourse/golang-builder - -FROM ${builder_image} as builder -COPY . /src -WORKDIR /src -ENV CGO_ENABLED 0 - -ARG goproxy -ENV GOPROXY=$goproxy - -RUN go get -d ./... -RUN go build -o /assets/in ./in -RUN go build -o /assets/out ./out -RUN go build -o /assets/check ./check -RUN set -e; for pkg in $(go list ./...); do \ - go test -o "/tests/$(basename $pkg).test" -c $pkg; \ - done - -FROM ${base_image} AS resource -RUN apk update && apk upgrade -RUN apk add --no-cache bash tzdata ca-certificates git jq openssh -RUN git config --global user.email "git@localhost" -RUN git config --global user.name "git" -COPY --from=builder assets/ /opt/resource/ -RUN chmod +x /opt/resource/* - -FROM resource AS tests -ARG SEMVER_TESTING_ACCESS_KEY_ID -ARG SEMVER_TESTING_SECRET_ACCESS_KEY -ARG SEMVER_TESTING_BUCKET -ARG SEMVER_TESTING_REGION -ARG SEMVER_TESTING_V2_SIGNING -COPY --from=builder /tests /go-tests -WORKDIR /go-tests -RUN set -e; for test in /go-tests/*.test; do \ - $test; \ - done -COPY test/ /opt/resource-tests -RUN /opt/resource-tests/all.sh - - -FROM resource