From 6b3f6e271ad32998ed81db4adecbf734b084195c Mon Sep 17 00:00:00 2001 From: Anirudh Warrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:58:22 +0530 Subject: [PATCH] update tests Dockerfile to copy only required files (#13961) --- integration-tests/test.Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/integration-tests/test.Dockerfile b/integration-tests/test.Dockerfile index fc6eefd650c..2e928ab29f8 100644 --- a/integration-tests/test.Dockerfile +++ b/integration-tests/test.Dockerfile @@ -1,10 +1,18 @@ ARG BASE_IMAGE ARG IMAGE_VERSION=latest -FROM ${BASE_IMAGE}:${IMAGE_VERSION} +FROM ${BASE_IMAGE}:${IMAGE_VERSION} AS build-env ARG SUITES=chaos migration performance reorg smoke soak benchmark COPY . testdir/ WORKDIR /go/testdir RUN /go/testdir/integration-tests/scripts/buildTests "${SUITES}" + +FROM ${BASE_IMAGE}:${IMAGE_VERSION} + +RUN mkdir -p /go/testdir/integration-tests/scripts +COPY --from=build-env /go/pkg /go/pkg +COPY --from=build-env /go/testdir/integration-tests/*.test /go/testdir/integration-tests/ +COPY --from=build-env /go/testdir/integration-tests/scripts /go/testdir/integration-tests/scripts/ + ENTRYPOINT ["/go/testdir/integration-tests/scripts/entrypoint"]