From 54c5f2bc8efbebca25ff9e909cda46390895b0f5 Mon Sep 17 00:00:00 2001 From: "Kuebler,Andreas (BI X) BIX-DE-I" Date: Tue, 15 Mar 2022 14:58:36 +0100 Subject: [PATCH 1/5] Add xargs in helm image --- build/package/Dockerfile.helm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/package/Dockerfile.helm b/build/package/Dockerfile.helm index 7aa7469e..cb25ae60 100644 --- a/build/package/Dockerfile.helm +++ b/build/package/Dockerfile.helm @@ -45,7 +45,9 @@ ENV HELM_PLUGIN_DIFF_VERSION=3.3.2 \ TAR_VERSION=1.30 \ GIT_VERSION=2.27 -RUN microdnf install skopeo-${SKOPEO_VERSION}* git-${GIT_VERSION}* tar-${TAR_VERSION}* && microdnf clean all +# helm-secrets depends on xargs (from GNU findutils) in it's signal handlers, +# c.f. https://github.com/jkroepke/helm-secrets/blob/main/scripts/commands/helm.sh#L34-L36 +RUN microdnf install skopeo-${SKOPEO_VERSION}* git-${GIT_VERSION}* tar-${TAR_VERSION}* findutils && microdnf clean all COPY --from=builder /usr/local/bin/deploy-with-helm /usr/local/bin/deploy-with-helm COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm From ba9d1d4cccf5e73857bbd3e1c261217ec9058da4 Mon Sep 17 00:00:00 2001 From: "Kuebler,Andreas (BI X) BIX-DE-I" Date: Wed, 16 Mar 2022 14:01:01 +0100 Subject: [PATCH 2/5] Fix findutils version and include it into SDS --- build/package/Dockerfile.helm | 5 +++-- docs/design/software-design-specification.adoc | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build/package/Dockerfile.helm b/build/package/Dockerfile.helm index cb25ae60..9351b7ab 100644 --- a/build/package/Dockerfile.helm +++ b/build/package/Dockerfile.helm @@ -43,11 +43,12 @@ ENV HELM_PLUGIN_DIFF_VERSION=3.3.2 \ HELM_PLUGINS=/usr/local/helm/plugins \ SKOPEO_VERSION=1.5 \ TAR_VERSION=1.30 \ - GIT_VERSION=2.27 + GIT_VERSION=2.27 \ + FINDUTILS_VERSION=4.6.0 # helm-secrets depends on xargs (from GNU findutils) in it's signal handlers, # c.f. https://github.com/jkroepke/helm-secrets/blob/main/scripts/commands/helm.sh#L34-L36 -RUN microdnf install skopeo-${SKOPEO_VERSION}* git-${GIT_VERSION}* tar-${TAR_VERSION}* findutils && microdnf clean all +RUN microdnf install skopeo-${SKOPEO_VERSION}* git-${GIT_VERSION}* tar-${TAR_VERSION}* findutils-${FINDUTILS_VERSION} && microdnf clean all COPY --from=builder /usr/local/bin/deploy-with-helm /usr/local/bin/deploy-with-helm COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm diff --git a/docs/design/software-design-specification.adoc b/docs/design/software-design-specification.adoc index b32db6b7..42506833 100644 --- a/docs/design/software-design-specification.adoc +++ b/docs/design/software-design-specification.adoc @@ -560,6 +560,12 @@ For all repositories in scope, the artifacts in the corresponding groups in Nexu | Python 3.9 available as container is a base platform for building and running various Python applications and frameworks. It is maintained by Red Hat and updated regularly. | https://catalog.redhat.com/software/containers/ubi8/python-39/6065b24eb92fbda3a4c65d8f +| SDS-EXT-29 +| GNU findutils +| 4.6.0 +| Basic directory searching utilities, included due to the dependency of `helm-secrets` on `xargs` +| https://www.gnu.org/software/findutils/ + |=== == Appendix From 86c7496a12aeb690a061e4437c723279f73c7d76 Mon Sep 17 00:00:00 2001 From: "Kuebler,Andreas (BI X) BIX-DE-I" Date: Wed, 16 Mar 2022 15:29:51 +0100 Subject: [PATCH 3/5] Get rid of patch version no. --- build/package/Dockerfile.helm | 4 ++-- docs/design/software-design-specification.adoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/package/Dockerfile.helm b/build/package/Dockerfile.helm index 9351b7ab..036e80ee 100644 --- a/build/package/Dockerfile.helm +++ b/build/package/Dockerfile.helm @@ -44,11 +44,11 @@ ENV HELM_PLUGIN_DIFF_VERSION=3.3.2 \ SKOPEO_VERSION=1.5 \ TAR_VERSION=1.30 \ GIT_VERSION=2.27 \ - FINDUTILS_VERSION=4.6.0 + FINDUTILS_VERSION=4.6 # helm-secrets depends on xargs (from GNU findutils) in it's signal handlers, # c.f. https://github.com/jkroepke/helm-secrets/blob/main/scripts/commands/helm.sh#L34-L36 -RUN microdnf install skopeo-${SKOPEO_VERSION}* git-${GIT_VERSION}* tar-${TAR_VERSION}* findutils-${FINDUTILS_VERSION} && microdnf clean all +RUN microdnf install skopeo-${SKOPEO_VERSION}* git-${GIT_VERSION}* tar-${TAR_VERSION}* findutils-${FINDUTILS_VERSION}* && microdnf clean all COPY --from=builder /usr/local/bin/deploy-with-helm /usr/local/bin/deploy-with-helm COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm diff --git a/docs/design/software-design-specification.adoc b/docs/design/software-design-specification.adoc index 42506833..d69a2b26 100644 --- a/docs/design/software-design-specification.adoc +++ b/docs/design/software-design-specification.adoc @@ -562,7 +562,7 @@ For all repositories in scope, the artifacts in the corresponding groups in Nexu | SDS-EXT-29 | GNU findutils -| 4.6.0 +| 4.6 | Basic directory searching utilities, included due to the dependency of `helm-secrets` on `xargs` | https://www.gnu.org/software/findutils/ From f40abcef37d263b97f652a7a49d83522142c4b4c Mon Sep 17 00:00:00 2001 From: "Kuebler,Andreas (BI X) BIX-DE-I" Date: Thu, 17 Mar 2022 08:12:59 +0100 Subject: [PATCH 4/5] Mention `findutils` dependency in changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 397d73e3..f196a62f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ listed in the changelog. - Gradle task does not expose Nexus env variables ([#373](https://github.com/opendevstack/ods-pipeline/issues/373)) - Gradle build fails when it contains more than one test class ([#414](https://github.com/opendevstack/ods-pipeline/issues/414)) - Gradle proxy settings are set during prepare-local-env ([#291](https://github.com/opendevstack/ods-pipeline/issues/291)) +- Add `xargs` to helm image as `helm-secrets` depends on it ([#465](https://github.com/opendevstack/ods-pipeline/issues/465)) ## [0.2.0] - 2021-12-22 ### Added From cc6736dd5d7e5dcfe0cef3ef784116f71cc53c36 Mon Sep 17 00:00:00 2001 From: "Kuebler,Andreas (BI X) BIX-DE-I" Date: Tue, 29 Mar 2022 08:14:03 +0200 Subject: [PATCH 5/5] Change test to work with new log output --- test/tasks/ods-deploy-helm_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tasks/ods-deploy-helm_test.go b/test/tasks/ods-deploy-helm_test.go index 5d4bb851..7fb9b7bd 100644 --- a/test/tasks/ods-deploy-helm_test.go +++ b/test/tasks/ods-deploy-helm_test.go @@ -99,7 +99,7 @@ func TestTaskODSDeployHelm(t *testing.T) { if strings.Contains(string(ctxt.CollectedLogs), doNotWantLogMsg) { t.Fatalf("Do not want:\n%s\n\nGot:\n%s", doNotWantLogMsg, string(ctxt.CollectedLogs)) } - wantLogMsg := "plugin \"diff\" identified at least one change" + wantLogMsg := "identified at least one change" if !strings.Contains(string(ctxt.CollectedLogs), wantLogMsg) { t.Fatalf("Want:\n%s\n\nGot:\n%s", wantLogMsg, string(ctxt.CollectedLogs)) }