From 1b2f4212c73f914f1d1cad2d2e06d058f54851cf Mon Sep 17 00:00:00 2001 From: tommyd450 Date: Wed, 29 Nov 2023 10:14:57 +0000 Subject: [PATCH 1/2] Adding back the git stash pop to dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 60986baa388..756145e114f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,9 @@ FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.21 AS bui WORKDIR /cosign COPY . . USER root -RUN git config --global --add safe.directory /cosign && \ +RUN git stash && \ + git config --global --add safe.directory /cosign && \ + git stash pop && \ export GIT_VERSION=$(git describe --tags --always --dirty) && \ go mod vendor && \ make -f Build.mak cosign-linux-amd64 && \ From 9ed7f0b8a9c60701e99da97f1d52021bb64dd81f Mon Sep 17 00:00:00 2001 From: tommyd450 Date: Wed, 29 Nov 2023 10:32:39 +0000 Subject: [PATCH 2/2] Adding git config to the main RUN command --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 756145e114f..595db3a8be5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,10 @@ FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.21 AS bui WORKDIR /cosign COPY . . USER root -RUN git stash && \ - git config --global --add safe.directory /cosign && \ - git stash pop && \ +RUN git config --global --add safe.directory /cosign && \ + git stash && \ export GIT_VERSION=$(git describe --tags --always --dirty) && \ + git stash pop && \ go mod vendor && \ make -f Build.mak cosign-linux-amd64 && \ make -f Build.mak cosign-darwin-amd64 && \