From 75fe5d00482d36b7fecffcc1549d1a2184c740ba Mon Sep 17 00:00:00 2001 From: Yoav Rotem Date: Wed, 9 Jun 2021 15:34:39 +0300 Subject: [PATCH] Fix ocp job issues (#893) * Fix openshift missing glibc Fixing issues #891 #890 * Update goreleaser Change release to build, no need to release while building (when pushed to main) but only when publishing (release new version) * Update goreleaser version to 0.169.0 * Change from release to build * Try day run on release It used to be released to docker hub each push, the issue was that docker hub had a automation for it, now test if its not releasing every git push. --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 2 +- Dockerfile | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 208e247..bc75115 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,5 +37,5 @@ jobs: - name: Dry-run release snapshot uses: goreleaser/goreleaser-action@v2 with: - version: v0.148.0 + version: v0.169.0 args: release --snapshot --skip-publish --rm-dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5030405..cca8d4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Release uses: goreleaser/goreleaser-action@v2 with: - version: v0.148.0 + version: v0.169.0 args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 6e02882..f8b720e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,12 @@ RUN apk --no-cache add procps # https://github.com/aquasecurity/kube-bench/issues/535 RUN apk --no-cache add openssl +# Add glibc for running oc command +RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub +RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.33-r0/glibc-2.33-r0.apk +RUN apk add glibc-2.33-r0.apk +RUN apk add jq + ENV PATH=$PATH:/usr/local/mount-from-host/bin COPY --from=build /go/bin/kube-bench /usr/local/bin/kube-bench