From a2858a8951502fade36f6d17744d4eaa6cec927e Mon Sep 17 00:00:00 2001 From: Pasan Date: Fri, 17 Jul 2026 23:13:43 +0530 Subject: [PATCH] ci: simplify canary-arm64 image selection to a matrix variable Extract the canary-arm64 job into a reusable ceph-arm64-suite-test.yml workflow, matrixed on a ceph_images input, matching the ceph-suite-tests/canary-tests reusable-workflow pattern. The matrix currently carries only the image already used by default (quay.io/ceph/ceph:v20), so this is a pure refactor with no change in test coverage. Adding or changing an arm64 test image is now a one-line variable update. Signed-off-by: Pasan --- .github/workflows/ceph-arm64-suite-test.yml | 75 +++++++++++++++++++++ .github/workflows/daily-nightly-jobs.yml | 52 ++------------ 2 files changed, 79 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/ceph-arm64-suite-test.yml diff --git a/.github/workflows/ceph-arm64-suite-test.yml b/.github/workflows/ceph-arm64-suite-test.yml new file mode 100644 index 000000000..7b341aec7 --- /dev/null +++ b/.github/workflows/ceph-arm64-suite-test.yml @@ -0,0 +1,75 @@ +name: Reusable Ceph arm64 suite integration tests +on: + # ONLY on.workflow_call ; call this from other files if needed + workflow_call: + inputs: + ceph_images: + description: "JSON list of Ceph images for creating Ceph cluster" + required: true + type: string + +defaults: + run: + # reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell + shell: bash --noprofile --norc -eo pipefail -x {0} + +permissions: + contents: read + +jobs: + canary-arm64: + runs-on: [ubuntu-22.04-arm] + strategy: + fail-fast: false + matrix: + ceph-image: ${{ fromJson(inputs.ceph_images) }} + + steps: + - name: checkout + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + fetch-depth: 0 + + - name: consider tmate debugging + uses: ./.github/workflows/tmate_debug + with: + use-tmate: ${{ secrets.USE_TMATE }} + + - name: setup cluster resources + uses: ./.github/workflows/integration-test-setup-cluster-resources + with: + kubernetes-version: "v1.36.1" + + - name: set Ceph image for ${{ matrix.ceph-image }} + run: tests/scripts/github-action-helper.sh replace_ceph_image deploy/examples/cluster-test.yaml "${{ matrix.ceph-image }}" + + - name: validate-yaml + run: tests/scripts/github-action-helper.sh validate_yaml + + - name: use local disk and create partitions for osds + run: | + tests/scripts/github-action-helper.sh use_local_disk + tests/scripts/github-action-helper.sh create_partitions_for_osds + + - name: deploy cluster + run: | + # Use the official build images for the nightly arm tests instead of rebuilding + export USE_LOCAL_BUILD=false + # removing liveness probes since the env is slow and the probe is killing the daemons + yq write -d0 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.mon.disabled" true + yq write -d0 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.mgr.disabled" true + yq write -d0 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.osd.disabled" true + tests/scripts/github-action-helper.sh deploy_cluster + tests/scripts/github-action-helper.sh deploy_all_additional_resources_on_cluster + + - name: wait for prepare pod + run: tests/scripts/github-action-helper.sh wait_for_prepare_pod 2 + + - name: wait for ceph to be ready + run: tests/scripts/github-action-helper.sh wait_for_ceph_to_be_ready all 2 + + - name: collect common logs + if: always() + uses: ./.github/workflows/collect-logs + with: + name: ${{ github.job }}-${{ matrix.ceph-image }} diff --git a/.github/workflows/daily-nightly-jobs.yml b/.github/workflows/daily-nightly-jobs.yml index bf69a2efe..05528083d 100644 --- a/.github/workflows/daily-nightly-jobs.yml +++ b/.github/workflows/daily-nightly-jobs.yml @@ -20,55 +20,11 @@ env: jobs: canary-arm64: - runs-on: [ubuntu-22.04-arm] if: github.repository == 'rook/rook' - - steps: - - name: checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - fetch-depth: 0 - - - name: consider tmate debugging - uses: ./.github/workflows/tmate_debug - with: - use-tmate: ${{ secrets.USE_TMATE }} - - - name: setup cluster resources - uses: ./.github/workflows/integration-test-setup-cluster-resources - with: - kubernetes-version: "v1.36.1" - - - name: validate-yaml - run: tests/scripts/github-action-helper.sh validate_yaml - - - name: use local disk and create partitions for osds - run: | - tests/scripts/github-action-helper.sh use_local_disk - tests/scripts/github-action-helper.sh create_partitions_for_osds - - - name: deploy cluster - run: | - # Use the official build images for the nightly arm tests instead of rebuilding - export USE_LOCAL_BUILD=false - # removing liveness probes since the env is slow and the probe is killing the daemons - yq write -d0 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.mon.disabled" true - yq write -d0 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.mgr.disabled" true - yq write -d0 -i deploy/examples/cluster-test.yaml "spec.healthCheck.livenessProbe.osd.disabled" true - tests/scripts/github-action-helper.sh deploy_cluster - tests/scripts/github-action-helper.sh deploy_all_additional_resources_on_cluster - - - name: wait for prepare pod - run: tests/scripts/github-action-helper.sh wait_for_prepare_pod 2 - - - name: wait for ceph to be ready - run: tests/scripts/github-action-helper.sh wait_for_ceph_to_be_ready all 2 - - - name: collect common logs - if: always() - uses: ./.github/workflows/collect-logs - with: - name: canary-arm64 + uses: ./.github/workflows/ceph-arm64-suite-test.yml + with: + ceph_images: '["quay.io/ceph/ceph:v20"]' + secrets: inherit ceph-suite-tests: if: github.repository == 'rook/rook'