From b0c3990c8a28b615c71674c17e8bd2ef25ad3c1a Mon Sep 17 00:00:00 2001 From: JasonPowr Date: Tue, 1 Oct 2024 11:34:49 +0100 Subject: [PATCH] fix-dirty-tag --- .gitignore | 2 +- .tekton/client-server-pull-request.yaml | 3 +-- .tekton/client-server-push.yaml | 3 +-- Dockerfile.cosign.rh | 6 +++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index f3515880e358..b2f7ef0bdb1e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ *.out # Dependency directories (remove the comment below to include it) -# vendor/ +vendor/ # cosign stuff /cosign* diff --git a/.tekton/client-server-pull-request.yaml b/.tekton/client-server-pull-request.yaml index 7e18303feaac..3c4366a416c7 100644 --- a/.tekton/client-server-pull-request.yaml +++ b/.tekton/client-server-pull-request.yaml @@ -7,8 +7,7 @@ metadata: build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch - == "main" + pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" && ( "Dockerfile.clients.rh".pathChanged() || ".tekton/client-server-pull-request.yaml".pathChanged() || "trigger-konflux-builds.txt".pathChanged() ) creationTimestamp: null labels: appstudio.openshift.io/application: cli diff --git a/.tekton/client-server-push.yaml b/.tekton/client-server-push.yaml index a963fd04aedf..1107e53744b9 100644 --- a/.tekton/client-server-push.yaml +++ b/.tekton/client-server-push.yaml @@ -6,8 +6,7 @@ metadata: build.appstudio.redhat.com/commit_sha: '{{revision}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch - == "main" + pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && ( "Dockerfile.clients.rh".pathChanged() || ".tekton/client-server-push.yaml".pathChanged() || "trigger-konflux-builds.txt".pathChanged() ) creationTimestamp: null labels: appstudio.openshift.io/application: cli diff --git a/Dockerfile.cosign.rh b/Dockerfile.cosign.rh index ec13f3416d97..112b875dd668 100644 --- a/Dockerfile.cosign.rh +++ b/Dockerfile.cosign.rh @@ -5,11 +5,11 @@ WORKDIR /cosign COPY . . USER root RUN git config --global --add safe.directory /cosign && \ - # git stash && \ + git stash && \ export GIT_VERSION=$(git describe --tags --always --dirty) && \ export GIT_HASH=$(git rev-parse HEAD) && \ export BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') && \ - # git stash pop && \ + git stash pop && \ go mod vendor && \ make -f Build.mak cross-platform && \ cp cosign-linux-amd64 cosign && \ @@ -58,4 +58,4 @@ RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME} WORKDIR ${HOME} # Makes sure the container stays running -CMD ["tail", "-f", "/dev/null"] \ No newline at end of file +CMD ["tail", "-f", "/dev/null"]