From bbf81d6ac5a1f0fc4e7d63606a356015756042ba Mon Sep 17 00:00:00 2001 From: Oleks Date: Tue, 12 May 2026 21:27:34 +0300 Subject: [PATCH] ci: split workflow per arch to fix cross-arch PVC scheduling A single-workflow with steps spanning amd64 and arm64 shares one PVC. The clone step binds the PV to whichever arch ran first, and the other arch's pod is then permanently Unschedulable (node affinity mismatch on the PV). Splitting into separate workflow files gives each arch its own clone, its own PVC, and its own node binding. --- .woodpecker.yml | 79 ------------------------------------------ .woodpecker/amd64.yaml | 39 +++++++++++++++++++++ .woodpecker/arm64.yaml | 37 ++++++++++++++++++++ 3 files changed, 76 insertions(+), 79 deletions(-) delete mode 100644 .woodpecker.yml create mode 100644 .woodpecker/amd64.yaml create mode 100644 .woodpecker/arm64.yaml diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index b29dfb9..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,79 +0,0 @@ -# Build flake-hub packages for all architectures and push to attic - -when: - - event: push - branch: main - -clone: - - name: clone - image: woodpeckerci/plugin-git - environment: - CI_NETRC_MACHINE: git.oleks.space - CI_NETRC_USERNAME: oleks - CI_NETRC_PASSWORD: - from_secret: gitea_clone_token - PLUGIN_TAGS: "false" - PLUGIN_DEPTH: "1" - -# Build packages for each architecture in parallel -steps: - - name: build-amd64 - image: git.oleks.space/oleks/nix-ci:latest - depends_on: [] - environment: - ATTIC_TOKEN: - from_secret: attic_token - GITEA_CLONE_TOKEN: - from_secret: gitea_clone_token - backend_options: - kubernetes: - nodeSelector: - kubernetes.io/arch: amd64 - labels: - commit-tag: "${CI_COMMIT_TAG}" - commit-branch: "${CI_COMMIT_BRANCH}" - pipeline-number: "${CI_PIPELINE_NUMBER}" - commands: - - sh ci/setup.sh - - python3 ci/build.py x86_64-linux - - - name: build-arm64 - image: git.oleks.space/oleks/nix-ci:latest - depends_on: [] - environment: - ATTIC_TOKEN: - from_secret: attic_token - GITEA_CLONE_TOKEN: - from_secret: gitea_clone_token - backend_options: - kubernetes: - nodeSelector: - kubernetes.io/arch: arm64 - labels: - commit-tag: "${CI_COMMIT_TAG}" - commit-branch: "${CI_COMMIT_BRANCH}" - pipeline-number: "${CI_PIPELINE_NUMBER}" - commands: - - sh ci/setup.sh - - python3 ci/build.py aarch64-linux - - # s390x disabled: no builder available - # - name: build-s390x - # image: git.oleks.space/oleks/nix-ci:latest - # depends_on: [] - # environment: - # ATTIC_TOKEN: - # from_secret: attic_token - # GITEA_CLONE_TOKEN: - # from_secret: gitea_clone_token - # backend_options: - # kubernetes: - # nodeSelector: - # kubernetes.io/arch: amd64 - # labels: - # commit-tag: "${CI_COMMIT_TAG}" - # commit-branch: "${CI_COMMIT_BRANCH}" - # pipeline-number: "${CI_PIPELINE_NUMBER}" - # commands: - # - sh ci/setup.sh - # - python3 ci/build.py s390x-linux diff --git a/.woodpecker/amd64.yaml b/.woodpecker/amd64.yaml new file mode 100644 index 0000000..0d1932d --- /dev/null +++ b/.woodpecker/amd64.yaml @@ -0,0 +1,39 @@ +# Build flake-hub packages for x86_64-linux and push to attic. +# Separate workflow per arch — sharing one PVC across arches makes +# the second pod permanently Unschedulable (PV node affinity binds +# to the first arch's node). + +when: + - event: push + branch: main + +clone: + - name: clone + image: woodpeckerci/plugin-git + environment: + CI_NETRC_MACHINE: git.oleks.space + CI_NETRC_USERNAME: oleks + CI_NETRC_PASSWORD: + from_secret: gitea_clone_token + PLUGIN_TAGS: "false" + PLUGIN_DEPTH: "1" + +steps: + - name: build-amd64 + image: git.oleks.space/oleks/nix-ci:latest + environment: + ATTIC_TOKEN: + from_secret: attic_token + GITEA_CLONE_TOKEN: + from_secret: gitea_clone_token + backend_options: + kubernetes: + nodeSelector: + kubernetes.io/arch: amd64 + labels: + commit-tag: "${CI_COMMIT_TAG}" + commit-branch: "${CI_COMMIT_BRANCH}" + pipeline-number: "${CI_PIPELINE_NUMBER}" + commands: + - sh ci/setup.sh + - python3 ci/build.py x86_64-linux diff --git a/.woodpecker/arm64.yaml b/.woodpecker/arm64.yaml new file mode 100644 index 0000000..365a95c --- /dev/null +++ b/.woodpecker/arm64.yaml @@ -0,0 +1,37 @@ +# Build flake-hub packages for aarch64-linux and push to attic. +# Separate workflow per arch — see amd64.yaml for rationale. + +when: + - event: push + branch: main + +clone: + - name: clone + image: woodpeckerci/plugin-git + environment: + CI_NETRC_MACHINE: git.oleks.space + CI_NETRC_USERNAME: oleks + CI_NETRC_PASSWORD: + from_secret: gitea_clone_token + PLUGIN_TAGS: "false" + PLUGIN_DEPTH: "1" + +steps: + - name: build-arm64 + image: git.oleks.space/oleks/nix-ci:latest + environment: + ATTIC_TOKEN: + from_secret: attic_token + GITEA_CLONE_TOKEN: + from_secret: gitea_clone_token + backend_options: + kubernetes: + nodeSelector: + kubernetes.io/arch: arm64 + labels: + commit-tag: "${CI_COMMIT_TAG}" + commit-branch: "${CI_COMMIT_BRANCH}" + pipeline-number: "${CI_PIPELINE_NUMBER}" + commands: + - sh ci/setup.sh + - python3 ci/build.py aarch64-linux