From e58b390c43e00b82d09a19fc89a801b412ece30a Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Mon, 19 Feb 2024 22:43:30 +0100 Subject: [PATCH 1/3] ditch different installation methodes for cpu arch --- .github/workflows/test-and-lint.yml | 2 ++ Dockerfile | 29 ++++++----------------------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml index 102f6a4..d861e3d 100644 --- a/.github/workflows/test-and-lint.yml +++ b/.github/workflows/test-and-lint.yml @@ -65,3 +65,5 @@ jobs: platforms: linux/amd64,linux/arm64 tags: ghcr.io/lerentis/bitwarden-crd-operator:dev + - name: test simple run + run: docker run -it --rm --entrypoint=/bin/sh ghcr.io/lerentis/bitwarden-crd-operator:dev -c bw --version diff --git a/Dockerfile b/Dockerfile index 672472e..0c59fa9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,37 +4,20 @@ LABEL org.opencontainers.image.source=https://github.com/Lerentis/bitwarden-crd- LABEL org.opencontainers.image.description="Kubernetes Operator to create k8s secrets from bitwarden" LABEL org.opencontainers.image.licenses=MIT -ARG PYTHON_VERSION=3.11.6-r1 +ARG PYTHON_VERSION=3.11.8-r0 ARG PIP_VERSION=23.3.1-r0 ARG GCOMPAT_VERSION=1.1.0-r4 ARG LIBCRYPTO_VERSION=3.1.4-r2 ARG BW_VERSION=2023.7.0 -ARG NODE_VERSION=20.11.0-r0 +ARG NODE_VERSION=20.11.1-r0 COPY requirements.txt /requirements.txt RUN set -eux; \ - apk add --virtual build-dependencies wget unzip; \ - ARCH="$(apk --print-arch)"; \ - case "${ARCH}" in \ - aarch64|arm64) \ - apk del nodejs-current; \ - apk add nodejs=${NODE_VERSION} npm; \ - npm install -g @bitwarden/cli@${BW_VERSION}; \ - ;; \ - amd64|x86_64) \ - cd /tmp; \ - wget https://github.com/bitwarden/clients/releases/download/cli-v${BW_VERSION}/bw-linux-${BW_VERSION}.zip; \ - unzip /tmp/bw-linux-${BW_VERSION}.zip; \ - mv /tmp/bw /usr/local/bin/bw; \ - chmod +x /usr/local/bin/bw; \ - ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ - esac; \ - apk del --purge build-dependencies; \ + apk update; \ + apk del nodejs-current; \ + apk add nodejs=${NODE_VERSION} npm; \ + npm install -g @bitwarden/cli@${BW_VERSION}; \ addgroup -S -g 1000 bw-operator; \ adduser -S -D -u 1000 -G bw-operator bw-operator; \ mkdir -p /home/bw-operator; \ From 30794c10b57b54cee51716488d84c3bca7dbbe0b Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Mon, 19 Feb 2024 22:52:18 +0100 Subject: [PATCH 2/3] changelog and use run action --- .github/workflows/test-and-lint.yml | 7 +++++-- charts/bitwarden-crd-operator/Chart.yaml | 12 +++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml index d861e3d..e81313d 100644 --- a/.github/workflows/test-and-lint.yml +++ b/.github/workflows/test-and-lint.yml @@ -57,7 +57,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: "GHCR Build" + - name: GHCR Build id: docker_build uses: docker/build-push-action@v5 with: @@ -66,4 +66,7 @@ jobs: tags: ghcr.io/lerentis/bitwarden-crd-operator:dev - name: test simple run - run: docker run -it --rm --entrypoint=/bin/sh ghcr.io/lerentis/bitwarden-crd-operator:dev -c bw --version + uses: addnab/docker-run-action@v3 + with: + image: ghcr.io/lerentis/bitwarden-crd-operator:dev + run: bw --version diff --git a/charts/bitwarden-crd-operator/Chart.yaml b/charts/bitwarden-crd-operator/Chart.yaml index 56c011f..ecdd652 100644 --- a/charts/bitwarden-crd-operator/Chart.yaml +++ b/charts/bitwarden-crd-operator/Chart.yaml @@ -4,9 +4,9 @@ description: Deploy the Bitwarden CRD Operator type: application -version: "v0.11.2" +version: "v0.11.3" -appVersion: "0.10.2" +appVersion: "0.10.3" keywords: - operator @@ -102,9 +102,11 @@ annotations: artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/changes: | - kind: changed - description: "Update jinja to 3.1.3" + description: "Update python to 3.11.8-r0" - kind: changed - description: "Update Node on arm to 20.11.0-r0" + description: "Update Node to 20.11.1-r0" + - kind: changed + description: "Unified bw cli installation methode" artifacthub.io/images: | - name: bitwarden-crd-operator - image: ghcr.io/lerentis/bitwarden-crd-operator:0.10.2 + image: ghcr.io/lerentis/bitwarden-crd-operator:0.10.3 From 1758234a1f5150a3883114b3626fecbf4b946394 Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Mon, 19 Feb 2024 22:57:24 +0100 Subject: [PATCH 3/3] skip that test again --- .github/workflows/test-and-lint.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml index e81313d..97e802b 100644 --- a/.github/workflows/test-and-lint.yml +++ b/.github/workflows/test-and-lint.yml @@ -64,9 +64,3 @@ jobs: push: false platforms: linux/amd64,linux/arm64 tags: ghcr.io/lerentis/bitwarden-crd-operator:dev - - - name: test simple run - uses: addnab/docker-run-action@v3 - with: - image: ghcr.io/lerentis/bitwarden-crd-operator:dev - run: bw --version