From bbdbd9a197f6196f9b12b0ae6badbe02b0e4387d Mon Sep 17 00:00:00 2001 From: Stephan D Date: Tue, 10 Mar 2026 19:49:29 +0100 Subject: [PATCH 1/2] amd64 image binding --- .woodpecker/bff.yml | 4 ++ .woodpecker/billing_documents.yml | 4 ++ .woodpecker/billing_fees.yml | 4 ++ .woodpecker/callbacks.yml | 4 ++ .woodpecker/discovery.yml | 4 ++ .woodpecker/frontend.yml | 4 ++ .woodpecker/fx_ingestor.yml | 4 ++ .woodpecker/fx_oracle.yml | 4 ++ .woodpecker/gateway_chain.yml | 4 ++ .woodpecker/gateway_mntx.yml | 4 ++ .woodpecker/gateway_tgsettle.yml | 4 ++ .woodpecker/gateway_tron.yml | 4 ++ .woodpecker/ledger.yml | 4 ++ .woodpecker/notification.yml | 4 ++ .woodpecker/payments_methods.yml | 4 ++ .woodpecker/payments_orchestrator.yml | 4 ++ .woodpecker/payments_quotation.yml | 4 ++ ci/prod/compose/bff.yml | 1 + ci/prod/compose/billing_documents.yml | 1 + ci/prod/compose/billing_fees.yml | 1 + ci/prod/compose/callbacks.yml | 1 + ci/prod/compose/chain_gateway.yml | 1 + ci/prod/compose/discovery.yml | 1 + ci/prod/compose/fx_ingestor.yml | 1 + ci/prod/compose/fx_oracle.yml | 1 + ci/prod/compose/ledger.yml | 1 + ci/prod/compose/mntx_gateway.yml | 1 + ci/prod/compose/notification.yml | 1 + ci/prod/compose/payments_methods.yml | 1 + ci/prod/compose/payments_orchestrator.yml | 1 + ci/prod/compose/payments_quotation.yml | 1 + ci/prod/compose/tgsettle_gateway.yml | 1 + ci/prod/compose/tron_gateway.yml | 1 + ci/scripts/common/buildx_build_and_push.sh | 52 ++++++++++++++++++++++ 34 files changed, 136 insertions(+) create mode 100644 ci/scripts/common/buildx_build_and_push.sh diff --git a/.woodpecker/bff.yml b/.woodpecker/bff.yml index db910539..34a7666b 100644 --- a/.woodpecker/bff.yml +++ b/.woodpecker/bff.yml @@ -7,6 +7,9 @@ matrix: BFF_VAULT_SECRET_PATH: sendico/edge/bff/vault BFF_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -87,6 +90,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/bff/build-image.sh - name: deploy diff --git a/.woodpecker/billing_documents.yml b/.woodpecker/billing_documents.yml index a4ffeb2f..2add4db2 100644 --- a/.woodpecker/billing_documents.yml +++ b/.woodpecker/billing_documents.yml @@ -5,6 +5,9 @@ matrix: DOCUMENTS_MONGO_SECRET_PATH: sendico/db DOCUMENTS_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -82,6 +85,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/billing_documents/build-image.sh - name: deploy diff --git a/.woodpecker/billing_fees.yml b/.woodpecker/billing_fees.yml index 17b2f553..9288883e 100644 --- a/.woodpecker/billing_fees.yml +++ b/.woodpecker/billing_fees.yml @@ -5,6 +5,9 @@ matrix: FEES_MONGO_SECRET_PATH: sendico/db FEES_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -82,6 +85,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/billing_fees/build-image.sh - name: deploy diff --git a/.woodpecker/callbacks.yml b/.woodpecker/callbacks.yml index 9520d1d9..276af5d8 100644 --- a/.woodpecker/callbacks.yml +++ b/.woodpecker/callbacks.yml @@ -6,6 +6,9 @@ matrix: CALLBACKS_VAULT_SECRET_PATH: sendico/edge/callbacks/vault CALLBACKS_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -83,6 +86,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/callbacks/build-image.sh - name: deploy diff --git a/.woodpecker/discovery.yml b/.woodpecker/discovery.yml index a893e08d..43f58144 100644 --- a/.woodpecker/discovery.yml +++ b/.woodpecker/discovery.yml @@ -4,6 +4,9 @@ matrix: DISCOVERY_DOCKERFILE: ci/prod/compose/discovery.dockerfile DISCOVERY_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -81,6 +84,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/discovery/build-image.sh - name: deploy diff --git a/.woodpecker/frontend.yml b/.woodpecker/frontend.yml index 794ac75f..6120b62e 100644 --- a/.woodpecker/frontend.yml +++ b/.woodpecker/frontend.yml @@ -4,6 +4,9 @@ matrix: FRONTEND_DOCKERFILE: ci/prod/compose/frontend.dockerfile FRONTEND_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -54,6 +57,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ version, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/frontend/build-image.sh - name: deploy diff --git a/.woodpecker/fx_ingestor.yml b/.woodpecker/fx_ingestor.yml index 034d5a7d..c6421233 100644 --- a/.woodpecker/fx_ingestor.yml +++ b/.woodpecker/fx_ingestor.yml @@ -8,6 +8,9 @@ matrix: FX_NEEDS_NATS: "true" FX_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -87,6 +90,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/fx/build-image.sh - name: deploy diff --git a/.woodpecker/fx_oracle.yml b/.woodpecker/fx_oracle.yml index 203a1674..a0d47719 100644 --- a/.woodpecker/fx_oracle.yml +++ b/.woodpecker/fx_oracle.yml @@ -8,6 +8,9 @@ matrix: FX_NEEDS_NATS: "true" FX_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -88,6 +91,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/fx/build-image.sh - name: deploy diff --git a/.woodpecker/gateway_chain.yml b/.woodpecker/gateway_chain.yml index 7c76d061..9addeb55 100644 --- a/.woodpecker/gateway_chain.yml +++ b/.woodpecker/gateway_chain.yml @@ -8,6 +8,9 @@ matrix: CHAIN_GATEWAY_VAULT_SECRET_PATH: sendico/gateway/chain/vault CHAIN_GATEWAY_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -86,6 +89,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "chain gateway image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/chain_gateway/build-image.sh - name: deploy diff --git a/.woodpecker/gateway_mntx.yml b/.woodpecker/gateway_mntx.yml index ff5e7f7b..fe78c8c4 100644 --- a/.woodpecker/gateway_mntx.yml +++ b/.woodpecker/gateway_mntx.yml @@ -7,6 +7,9 @@ matrix: MNTX_GATEWAY_NATS_SECRET_PATH: sendico/nats MNTX_GATEWAY_MONGO_SECRET_PATH: sendico/db +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -85,6 +88,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/mntx/build-image.sh - name: deploy diff --git a/.woodpecker/gateway_tgsettle.yml b/.woodpecker/gateway_tgsettle.yml index 2d080430..e5ec9e8d 100644 --- a/.woodpecker/gateway_tgsettle.yml +++ b/.woodpecker/gateway_tgsettle.yml @@ -5,6 +5,9 @@ matrix: TGSETTLE_GATEWAY_MONGO_SECRET_PATH: sendico/db TGSETTLE_GATEWAY_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -83,6 +86,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/tgsettle/build-image.sh - name: deploy diff --git a/.woodpecker/gateway_tron.yml b/.woodpecker/gateway_tron.yml index 5d64d829..18352d26 100644 --- a/.woodpecker/gateway_tron.yml +++ b/.woodpecker/gateway_tron.yml @@ -8,6 +8,9 @@ matrix: TRON_GATEWAY_VAULT_SECRET_PATH: sendico/gateway/tron/vault TRON_GATEWAY_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -86,6 +89,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/tron_gateway/build-image.sh - name: deploy diff --git a/.woodpecker/ledger.yml b/.woodpecker/ledger.yml index 26304f8c..8d260857 100644 --- a/.woodpecker/ledger.yml +++ b/.woodpecker/ledger.yml @@ -5,6 +5,9 @@ matrix: LEDGER_MONGO_SECRET_PATH: sendico/db LEDGER_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -82,6 +85,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/ledger/build-image.sh - name: deploy diff --git a/.woodpecker/notification.yml b/.woodpecker/notification.yml index 11e50cb7..af8a77f6 100644 --- a/.woodpecker/notification.yml +++ b/.woodpecker/notification.yml @@ -8,6 +8,9 @@ matrix: NOTIFICATION_TELEGRAM_SECRET_PATH: sendico/notification/telegram NOTIFICATION_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -85,6 +88,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/notification/build-image.sh - name: deploy diff --git a/.woodpecker/payments_methods.yml b/.woodpecker/payments_methods.yml index 3226da10..2dce8ff0 100644 --- a/.woodpecker/payments_methods.yml +++ b/.woodpecker/payments_methods.yml @@ -5,6 +5,9 @@ matrix: PAYMENTS_METHODS_MONGO_SECRET_PATH: sendico/db PAYMENTS_METHODS_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -83,6 +86,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/payments_methods/build-image.sh - name: deploy diff --git a/.woodpecker/payments_orchestrator.yml b/.woodpecker/payments_orchestrator.yml index 9c742eb5..3bfd3916 100644 --- a/.woodpecker/payments_orchestrator.yml +++ b/.woodpecker/payments_orchestrator.yml @@ -5,6 +5,9 @@ matrix: PAYMENTS_MONGO_SECRET_PATH: sendico/db PAYMENTS_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -83,6 +86,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/payments_orchestrator/build-image.sh - name: deploy diff --git a/.woodpecker/payments_quotation.yml b/.woodpecker/payments_quotation.yml index a2af8fc2..a88d3b1c 100644 --- a/.woodpecker/payments_quotation.yml +++ b/.woodpecker/payments_quotation.yml @@ -5,6 +5,9 @@ matrix: PAYMENTS_QUOTATION_MONGO_SECRET_PATH: sendico/db PAYMENTS_QUOTATION_ENV: prod +labels: + platform: linux/amd64 + when: - event: push branch: main @@ -83,6 +86,7 @@ steps: image: gcr.io/kaniko-project/executor:debug depends_on: [ backend-lint, backend-tests, secrets ] commands: + - '[ "$(uname -m)" = "x86_64" ] || { echo "image build requires an amd64 runner"; exit 1; }' - sh ci/scripts/payments_quotation/build-image.sh - name: deploy diff --git a/ci/prod/compose/bff.yml b/ci/prod/compose/bff.yml index d452da18..dc732f6f 100644 --- a/ci/prod/compose/bff.yml +++ b/ci/prod/compose/bff.yml @@ -22,6 +22,7 @@ services: sendico_bff: <<: *common-env container_name: sendico-bff + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/bff/service:${APP_V} pull_policy: always diff --git a/ci/prod/compose/billing_documents.yml b/ci/prod/compose/billing_documents.yml index b1062c02..59382161 100644 --- a/ci/prod/compose/billing_documents.yml +++ b/ci/prod/compose/billing_documents.yml @@ -14,6 +14,7 @@ services: sendico_billing_documents: <<: *common-env container_name: sendico-billing-documents + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/billing/documents:${APP_V} pull_policy: always diff --git a/ci/prod/compose/billing_fees.yml b/ci/prod/compose/billing_fees.yml index 215cd305..5a996d17 100644 --- a/ci/prod/compose/billing_fees.yml +++ b/ci/prod/compose/billing_fees.yml @@ -14,6 +14,7 @@ services: sendico_billing_fees: <<: *common-env container_name: sendico-billing-fees + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/billing/fees:${APP_V} pull_policy: always diff --git a/ci/prod/compose/callbacks.yml b/ci/prod/compose/callbacks.yml index d368caca..3020c6b0 100644 --- a/ci/prod/compose/callbacks.yml +++ b/ci/prod/compose/callbacks.yml @@ -22,6 +22,7 @@ services: sendico_callbacks: <<: *common-env container_name: sendico-callbacks + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/edge/callbacks:${APP_V} pull_policy: always diff --git a/ci/prod/compose/chain_gateway.yml b/ci/prod/compose/chain_gateway.yml index fa56dd14..d052f537 100644 --- a/ci/prod/compose/chain_gateway.yml +++ b/ci/prod/compose/chain_gateway.yml @@ -22,6 +22,7 @@ services: sendico_chain_gateway: <<: *common-env container_name: sendico-chain-gateway + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/gateway/chain:${APP_V} pull_policy: always diff --git a/ci/prod/compose/discovery.yml b/ci/prod/compose/discovery.yml index 7bc3341c..c9fd1840 100644 --- a/ci/prod/compose/discovery.yml +++ b/ci/prod/compose/discovery.yml @@ -14,6 +14,7 @@ services: sendico_discovery: <<: *common-env container_name: sendico-discovery + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/discovery/service:${APP_V} pull_policy: always diff --git a/ci/prod/compose/fx_ingestor.yml b/ci/prod/compose/fx_ingestor.yml index af1b50d7..da891368 100644 --- a/ci/prod/compose/fx_ingestor.yml +++ b/ci/prod/compose/fx_ingestor.yml @@ -14,6 +14,7 @@ services: sendico_fx_ingestor: <<: *common-env container_name: sendico-fx-ingestor + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/fx/ingestor:${APP_V} pull_policy: always diff --git a/ci/prod/compose/fx_oracle.yml b/ci/prod/compose/fx_oracle.yml index b777ed7c..0a9e7a47 100644 --- a/ci/prod/compose/fx_oracle.yml +++ b/ci/prod/compose/fx_oracle.yml @@ -14,6 +14,7 @@ services: sendico_fx_oracle: <<: *common-env container_name: sendico-fx-oracle + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/fx/oracle:${APP_V} pull_policy: always diff --git a/ci/prod/compose/ledger.yml b/ci/prod/compose/ledger.yml index c32d6e46..905fdcf4 100644 --- a/ci/prod/compose/ledger.yml +++ b/ci/prod/compose/ledger.yml @@ -14,6 +14,7 @@ services: sendico_ledger: <<: *common-env container_name: sendico-ledger + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/ledger/service:${APP_V} pull_policy: always diff --git a/ci/prod/compose/mntx_gateway.yml b/ci/prod/compose/mntx_gateway.yml index 1c9feec6..5314c0f6 100644 --- a/ci/prod/compose/mntx_gateway.yml +++ b/ci/prod/compose/mntx_gateway.yml @@ -14,6 +14,7 @@ services: sendico_mntx_gateway: <<: *common-env container_name: sendico-mntx-gateway + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/gateway/mntx:${APP_V} pull_policy: always diff --git a/ci/prod/compose/notification.yml b/ci/prod/compose/notification.yml index 3ca2723e..8e9116de 100644 --- a/ci/prod/compose/notification.yml +++ b/ci/prod/compose/notification.yml @@ -14,6 +14,7 @@ services: sendico_notification: <<: *common-env container_name: sendico-notification + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/notification/service:${APP_V} pull_policy: always diff --git a/ci/prod/compose/payments_methods.yml b/ci/prod/compose/payments_methods.yml index 4c24fb89..c62673c3 100644 --- a/ci/prod/compose/payments_methods.yml +++ b/ci/prod/compose/payments_methods.yml @@ -14,6 +14,7 @@ services: sendico_payments_methods: <<: *common-env container_name: sendico-payments-methods + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/payments/methods:${APP_V} pull_policy: always diff --git a/ci/prod/compose/payments_orchestrator.yml b/ci/prod/compose/payments_orchestrator.yml index ab4de199..b42fa262 100644 --- a/ci/prod/compose/payments_orchestrator.yml +++ b/ci/prod/compose/payments_orchestrator.yml @@ -14,6 +14,7 @@ services: sendico_payments_orchestrator: <<: *common-env container_name: sendico-payments-orchestrator + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/payments/orchestrator:${APP_V} pull_policy: always diff --git a/ci/prod/compose/payments_quotation.yml b/ci/prod/compose/payments_quotation.yml index a3b8d50c..09a47c1a 100644 --- a/ci/prod/compose/payments_quotation.yml +++ b/ci/prod/compose/payments_quotation.yml @@ -14,6 +14,7 @@ services: sendico_payments_quotation: <<: *common-env container_name: sendico-payments-quotation + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/payments/quotation:${APP_V} pull_policy: always diff --git a/ci/prod/compose/tgsettle_gateway.yml b/ci/prod/compose/tgsettle_gateway.yml index 85cd61ae..1f505f7a 100644 --- a/ci/prod/compose/tgsettle_gateway.yml +++ b/ci/prod/compose/tgsettle_gateway.yml @@ -14,6 +14,7 @@ services: sendico_tgsettle_gateway: <<: *common-env container_name: sendico-tgsettle-gateway + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/gateway/tgsettle:${APP_V} pull_policy: always diff --git a/ci/prod/compose/tron_gateway.yml b/ci/prod/compose/tron_gateway.yml index 3b491437..c800b05d 100644 --- a/ci/prod/compose/tron_gateway.yml +++ b/ci/prod/compose/tron_gateway.yml @@ -22,6 +22,7 @@ services: sendico_tron_gateway: <<: *common-env container_name: sendico-tron-gateway + platform: linux/amd64 restart: unless-stopped image: ${REGISTRY_URL}/gateway/tron:${APP_V} pull_policy: always diff --git a/ci/scripts/common/buildx_build_and_push.sh b/ci/scripts/common/buildx_build_and_push.sh new file mode 100644 index 00000000..ae151e93 --- /dev/null +++ b/ci/scripts/common/buildx_build_and_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +set -eu + +if ! set -o pipefail 2>/dev/null; then + : +fi + +REGISTRY_HOST="${REGISTRY_HOST:?missing REGISTRY_HOST}" +REGISTRY_USER="${REGISTRY_USER:?missing REGISTRY_USER}" +REGISTRY_PASSWORD="${REGISTRY_PASSWORD:?missing REGISTRY_PASSWORD}" +BUILD_CONTEXT="${BUILD_CONTEXT:?missing BUILD_CONTEXT}" +IMAGE_DOCKERFILE="${IMAGE_DOCKERFILE:?missing IMAGE_DOCKERFILE}" +IMAGE_DESTINATION="${IMAGE_DESTINATION:?missing IMAGE_DESTINATION}" +APP_V="${APP_V:?missing APP_V}" +GIT_REV="${GIT_REV:?missing GIT_REV}" +BUILD_BRANCH="${BUILD_BRANCH:?missing BUILD_BRANCH}" +BUILD_DATE="${BUILD_DATE:?missing BUILD_DATE}" +BUILD_USER="${BUILD_USER:?missing BUILD_USER}" + +BUILD_PLATFORM="${BUILD_PLATFORM:-linux/amd64}" +BUILDER_NAME="${BUILDER_NAME:-sendico-cross-builder}" + +if [ ! -S /var/run/docker.sock ]; then + echo "[buildx] docker socket not found at /var/run/docker.sock" >&2 + exit 69 +fi + +printf '%s' "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOST}" --username "${REGISTRY_USER}" --password-stdin + +docker run --rm --privileged tonistiigi/binfmt --install amd64 + +if docker buildx inspect "${BUILDER_NAME}" >/dev/null 2>&1; then + docker buildx use "${BUILDER_NAME}" +else + docker buildx create --name "${BUILDER_NAME}" --driver docker-container --use +fi + +docker buildx inspect --bootstrap >/dev/null + +docker buildx build \ + --platform "${BUILD_PLATFORM}" \ + --file "${IMAGE_DOCKERFILE}" \ + --tag "${IMAGE_DESTINATION}" \ + --build-arg APP_VERSION="${APP_V}" \ + --build-arg GIT_REV="${GIT_REV}" \ + --build-arg BUILD_BRANCH="${BUILD_BRANCH}" \ + --build-arg BUILD_DATE="${BUILD_DATE}" \ + --build-arg BUILD_USER="${BUILD_USER}" \ + --provenance=false \ + --pull \ + --push \ + "${BUILD_CONTEXT}" -- 2.49.1 From 65b04fba39c52f17cedb507d74874095b319a132 Mon Sep 17 00:00:00 2001 From: Stephan D Date: Tue, 10 Mar 2026 19:50:34 +0100 Subject: [PATCH 2/2] removed buildx setting --- ci/scripts/common/buildx_build_and_push.sh | 52 ---------------------- 1 file changed, 52 deletions(-) delete mode 100644 ci/scripts/common/buildx_build_and_push.sh diff --git a/ci/scripts/common/buildx_build_and_push.sh b/ci/scripts/common/buildx_build_and_push.sh deleted file mode 100644 index ae151e93..00000000 --- a/ci/scripts/common/buildx_build_and_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -set -eu - -if ! set -o pipefail 2>/dev/null; then - : -fi - -REGISTRY_HOST="${REGISTRY_HOST:?missing REGISTRY_HOST}" -REGISTRY_USER="${REGISTRY_USER:?missing REGISTRY_USER}" -REGISTRY_PASSWORD="${REGISTRY_PASSWORD:?missing REGISTRY_PASSWORD}" -BUILD_CONTEXT="${BUILD_CONTEXT:?missing BUILD_CONTEXT}" -IMAGE_DOCKERFILE="${IMAGE_DOCKERFILE:?missing IMAGE_DOCKERFILE}" -IMAGE_DESTINATION="${IMAGE_DESTINATION:?missing IMAGE_DESTINATION}" -APP_V="${APP_V:?missing APP_V}" -GIT_REV="${GIT_REV:?missing GIT_REV}" -BUILD_BRANCH="${BUILD_BRANCH:?missing BUILD_BRANCH}" -BUILD_DATE="${BUILD_DATE:?missing BUILD_DATE}" -BUILD_USER="${BUILD_USER:?missing BUILD_USER}" - -BUILD_PLATFORM="${BUILD_PLATFORM:-linux/amd64}" -BUILDER_NAME="${BUILDER_NAME:-sendico-cross-builder}" - -if [ ! -S /var/run/docker.sock ]; then - echo "[buildx] docker socket not found at /var/run/docker.sock" >&2 - exit 69 -fi - -printf '%s' "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOST}" --username "${REGISTRY_USER}" --password-stdin - -docker run --rm --privileged tonistiigi/binfmt --install amd64 - -if docker buildx inspect "${BUILDER_NAME}" >/dev/null 2>&1; then - docker buildx use "${BUILDER_NAME}" -else - docker buildx create --name "${BUILDER_NAME}" --driver docker-container --use -fi - -docker buildx inspect --bootstrap >/dev/null - -docker buildx build \ - --platform "${BUILD_PLATFORM}" \ - --file "${IMAGE_DOCKERFILE}" \ - --tag "${IMAGE_DESTINATION}" \ - --build-arg APP_VERSION="${APP_V}" \ - --build-arg GIT_REV="${GIT_REV}" \ - --build-arg BUILD_BRANCH="${BUILD_BRANCH}" \ - --build-arg BUILD_DATE="${BUILD_DATE}" \ - --build-arg BUILD_USER="${BUILD_USER}" \ - --provenance=false \ - --pull \ - --push \ - "${BUILD_CONTEXT}" -- 2.49.1