Skip to content

Commit

Permalink
Merge pull request moby#39150 from kolyshkin/dockerfile.e2e
Browse files Browse the repository at this point in the history
Dockerfile.e2e: copy test sources
  • Loading branch information
thaJeztah authored May 3, 2019
2 parents e516af6 + c3b2494 commit 619df5a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ RUN CGO_ENABLED=0 go build -buildmode=pie -o /build/httpserver/httpserver github
FROM base AS builder

# Set tag and add sources
ARG DOCKER_GITCOMMIT
ENV DOCKER_GITCOMMIT=${DOCKER_GITCOMMIT:-undefined}
COPY . .
# Copy test sources tests that use assert can print errors
RUN mkdir -p /build${PWD} && find integration integration-cli -name \*_test.go -exec cp --parents '{}' /build${PWD} \;
# Build and install test binaries
ARG DOCKER_GITCOMMIT=undefined
RUN hack/make.sh build-integration-test-binary
RUN mkdir -p /build/ && find . -name test.main -exec cp --parents '{}' /build \;
RUN mkdir -p /build/tests && find . -name test.main -exec cp --parents '{}' /build/tests \;

## Generate testing image
FROM alpine:3.9 as runner
Expand Down Expand Up @@ -77,4 +79,4 @@ COPY integration-cli/fixtures /tests/integration-cli/fixtures
COPY --from=frozen-images /build/ /docker-frozen-images
COPY --from=dockercli /build/ /usr/bin/
COPY --from=contrib /build/ /tests/contrib/
COPY --from=builder /build/ /tests/
COPY --from=builder /build/ /

0 comments on commit 619df5a

Please sign in to comment.