diff --git a/Dockerfile b/Dockerfile index fcbfd9c0e5ee..de0e4ab46f96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -88,12 +88,22 @@ RUN JOBS=max yarn --cwd ui build FROM builder as argoexec-build +# Tell git to forget about all of the files that were not included because of .dockerignore in order to ensure that +# the git state is "clean" even though said .dockerignore files are not present +RUN cat .dockerignore >> .gitignore +RUN git status --porcelain | cut -c4- | xargs git update-index --skip-worktree + RUN --mount=type=cache,target=/root/.cache/go-build make dist/argoexec #################################################################################################### FROM builder as workflow-controller-build +# Tell git to forget about all of the files that were not included because of .dockerignore in order to ensure that +# the git state is "clean" even though said .dockerignore files are not present +RUN cat .dockerignore >> .gitignore +RUN git status --porcelain | cut -c4- | xargs git update-index --skip-worktree + RUN --mount=type=cache,target=/root/.cache/go-build make dist/workflow-controller #################################################################################################### @@ -105,6 +115,12 @@ COPY --from=argo-ui ui/dist/app ui/dist/app # stop make from trying to re-build this without yarn installed RUN touch ui/dist/node_modules.marker RUN touch ui/dist/app/index.html + +# Tell git to forget about all of the files that were not included because of .dockerignore in order to ensure that +# the git state is "clean" even though said .dockerignore files are not present +RUN cat .dockerignore >> .gitignore +RUN git status --porcelain | cut -c4- | xargs git update-index --skip-worktree + RUN --mount=type=cache,target=/root/.cache/go-build make dist/argo ####################################################################################################