From 4550e9347af41eb5fe125f4f2549fb52e4f51861 Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Mon, 28 Apr 2025 13:49:34 -0700 Subject: [PATCH 01/12] X-Smart-Branch-Parent: master From 2ec7e400a01c5dd91a6194c8c7bbb80ecee285aa Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Mon, 28 Apr 2025 13:49:49 -0700 Subject: [PATCH 02/12] Revert "Revert GH arm changes (#2107)" This reverts commit 61cd323e685b4d0b984a599bd323be5362b48083. --- .github/workflows/collector-builder.yml | 202 ++++++++++++------------ .github/workflows/collector.yml | 62 ++------ .github/workflows/init.yml | 7 + .github/workflows/integration-tests.yml | 3 - .github/workflows/main.yml | 2 + .github/workflows/unit-tests.yml | 4 +- 6 files changed, 133 insertions(+), 147 deletions(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index 710fee006e..9ff9184782 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -8,10 +8,16 @@ on: required: true description: | The tag used to build the collector image + architectures: + type: string + required: true + description: | + Space-seperated list of architectures to build + outputs: collector-builder-tag: description: The builder tag used by the build - value: ${{ jobs.build-builder-image.outputs.collector-builder-tag || 'master' }} + value: ${{ jobs.builder-needs-rebuilding.outputs.collector-builder-tag }} env: COLLECTOR_TAG: ${{ inputs.collector-tag }} @@ -23,7 +29,11 @@ jobs: name: Determine if builder image needs to be built runs-on: ubuntu-24.04 outputs: - build-image: ${{ steps.changed.outputs.builder-changed }} + build-image: ${{ steps.builder-tag.outputs.build-image || false }} + collector-builder-tag: ${{ steps.builder-tag.outputs.collector-builder-tag || 'master'}} + + env: + DEFAULT_BUILDER_TAG: master steps: - uses: actions/checkout@v4 @@ -38,30 +48,46 @@ jobs: - builder/Dockerfile - .github/workflows/collector-builder.yml + - name: Check labels and define builder tag + id: builder-tag + if: | + steps.changed.outputs.builder-changed == 'true' || + (github.event_name == 'push' && ( + github.ref_type == 'tag' || startsWith(github.ref_name, 'release-') + )) || + contains(github.event.pull_request.labels.*.name, 'build-builder-image') || + github.event_name == 'schedule' + run: | + COLLECTOR_BUILDER_TAG="${DEFAULT_BUILDER_TAG}" + if [[ "${{ github.event_name }}" == 'pull_request' || \ + "${{ github.ref_type }}" == 'tag' || \ + "${{ github.ref_name }}" =~ ^release- ]]; then + COLLECTOR_BUILDER_TAG="${{ inputs.collector-tag }}" + fi + + echo "Rebuild builder image with tag ${COLLECTOR_BUILDER_TAG}" + echo "collector-builder-tag=${COLLECTOR_BUILDER_TAG}" >> "$GITHUB_OUTPUT" + echo "build-image=true" >> "$GITHUB_OUTPUT" + build-builder-image: - name: Build the builder image - runs-on: ubuntu-24.04 + name: Local builder image # Multiarch builds sometimes take for eeeeeeeeeever timeout-minutes: 480 needs: - builder-needs-rebuilding if: | - needs.builder-needs-rebuilding.outputs.build-image == 'true' || - (github.event_name == 'push' && ( - github.ref_type == 'tag' || startsWith(github.ref_name, 'release-') - )) || - contains(github.event.pull_request.labels.*.name, 'build-builder-image') || - github.event_name == 'schedule' - outputs: - collector-builder-tag: ${{ steps.builder-tag.outputs.collector-builder-tag }} + needs.builder-needs-rebuilding.outputs.build-image == 'true' strategy: - fail-fast: false matrix: - arch: [amd64, ppc64le, s390x, arm64] + arch: [amd64, arm64, ppc64le] + exclude: + - arch: ${{ contains(inputs.architectures, 'ppc64le') && '' || 'ppc64le' }} + runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }} env: PLATFORM: linux/${{ matrix.arch }} BUILD_TYPE: ci + COLLECTOR_BUILDER_TAG: ${{ needs.builder-needs-rebuilding.outputs.collector-builder-tag }} steps: - uses: actions/checkout@v4 @@ -76,6 +102,54 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Create ansible vars + run: | + cat << EOF > ${{ github.workspace }}/ansible/secrets.yml + --- + stackrox_io_username: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }} + stackrox_io_password: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }} + rhacs_eng_username: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }} + rhacs_eng_password: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }} + collector_git_ref: ${{ github.ref }} + collector_builder_tag: ${{ env.COLLECTOR_BUILDER_TAG }} + EOF + + - name: Build images + timeout-minutes: 480 + run: | + ansible-galaxy install -r ansible/requirements.yml + ansible-playbook \ + --connection local \ + -i localhost, \ + --limit localhost \ + -e arch='${{ matrix.arch }}' \ + -e @'${{ github.workspace }}/ansible/secrets.yml' \ + ansible/ci-build-builder.yml + + build-builder-image-remote-vm: + name: Remote builder image + # Multiarch builds sometimes take for eeeeeeeeeever + timeout-minutes: 480 + needs: + - builder-needs-rebuilding + if: | + needs.builder-needs-rebuilding.outputs.build-image == 'true' && + contains(inputs.architectures, 's390x') + strategy: + matrix: + arch: [s390x] + runs-on: ubuntu-24.04 + + env: + PLATFORM: linux/${{ matrix.arch }} + BUILD_TYPE: ci + COLLECTOR_BUILDER_TAG: ${{ needs.builder-needs-rebuilding.outputs.collector-builder-tag }} + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: actions/setup-python@v5 with: python-version: "3.10" @@ -101,57 +175,22 @@ jobs: job-tag: builder - name: Create Build VMs - if: | - matrix.arch == 's390x' && - (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds')) run: | make -C "${{ github.workspace }}/ansible" create-build-vms - - name: Define builder tag - id: builder-tag - run: | - COLLECTOR_BUILDER_TAG="${DEFAULT_BUILDER_TAG}" - if [[ "${{ github.event_name }}" == 'pull_request' || \ - "${{ github.ref_type }}" == 'tag' || \ - "${{ github.ref_name }}" =~ ^release- ]]; then - COLLECTOR_BUILDER_TAG="${{ inputs.collector-tag }}" - fi - - echo "COLLECTOR_BUILDER_TAG=${COLLECTOR_BUILDER_TAG}" >> "$GITHUB_ENV" - echo "collector-builder-tag=${COLLECTOR_BUILDER_TAG}" >> "$GITHUB_OUTPUT" - - name: Create ansible vars run: | - { - echo "---" - echo "stackrox_io_username: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }}" - echo "stackrox_io_password: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }}" - echo "rhacs_eng_username: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }}" - echo "rhacs_eng_password: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }}" - echo "collector_git_ref: ${{ github.ref }}" - echo "collector_builder_tag: ${{ env.COLLECTOR_BUILDER_TAG }}" - } > ${{ github.workspace }}/ansible/secrets.yml + cat << EOF > ${{ github.workspace }}/ansible/secrets.yml + --- + stackrox_io_username: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }} + stackrox_io_password: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }} + rhacs_eng_username: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }} + rhacs_eng_password: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }} + collector_git_ref: ${{ github.ref }} + collector_builder_tag: ${{ needs.builder-needs-rebuilding.outputs.collector-builder-tag }} + EOF - name: Build images - if: | - (github.event_name != 'pull_request' && matrix.arch != 's390x') || - matrix.arch == 'amd64' || - (contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') && matrix.arch != 's390x') - timeout-minutes: 480 - run: | - ansible-galaxy install -r ansible/requirements.yml - ansible-playbook \ - --connection local \ - -i localhost, \ - --limit localhost \ - -e arch='${{ matrix.arch }}' \ - -e @'${{ github.workspace }}/ansible/secrets.yml' \ - ansible/ci-build-builder.yml - - - name: Build s390x images - if: | - (github.event_name != 'pull_request' && matrix.arch == 's390x') || - (contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') && matrix.arch == 's390x') timeout-minutes: 480 run: | ansible-playbook \ @@ -162,22 +201,23 @@ jobs: ansible/ci-build-builder.yml - name: Destroy VMs - if: always() && matrix.arch == 's390x' + if: always() run: | make -C ansible destroy-vms create-multiarch-manifest: needs: + - builder-needs-rebuilding - build-builder-image + - build-builder-image-remote-vm name: Create Multiarch manifest runs-on: ubuntu-24.04 if: | - github.event_name != 'pull_request' || - (needs.build-builder-image.outputs.collector-builder-tag != 'cache' && - contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds')) + always() && !contains(join(needs.*.result, ','), 'failure') && + needs.builder-needs-rebuilding.outputs.build-image == 'true' env: - COLLECTOR_BUILDER_TAG: ${{ needs.build-builder-image.outputs.collector-builder-tag }} - ARCHS: amd64 ppc64le s390x arm64 + COLLECTOR_BUILDER_TAG: ${{ needs.builder-needs-rebuilding.outputs.collector-builder-tag }} + ARCHS: ${{ inputs.architectures }} steps: - uses: actions/checkout@v4 @@ -208,45 +248,13 @@ jobs: base-image: quay.io/rhacs-eng/collector-builder:${{ env.COLLECTOR_BUILDER_TAG }} archs: ${{ env.ARCHS }} - retag-x86-image: - needs: - - build-builder-image - name: Retag x86 builder image - runs-on: ubuntu-24.04 - if: | - github.event_name == 'pull_request' && - needs.build-builder-image.outputs.collector-builder-tag != 'cache' && - !contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') - env: - COLLECTOR_BUILDER_TAG: ${{ needs.build-builder-image.outputs.collector-builder-tag }} - steps: - - name: Pull image to retag - run: | - docker pull "quay.io/stackrox-io/collector-builder:${COLLECTOR_BUILDER_TAG}-amd64" - - - name: Retag and push stackrox-io - uses: stackrox/actions/images/retag-and-push@v1 - with: - src-image: quay.io/stackrox-io/collector-builder:${{ env.COLLECTOR_BUILDER_TAG }}-amd64 - dst-image: quay.io/stackrox-io/collector-builder:${{ env.COLLECTOR_BUILDER_TAG }} - username: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }} - password: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }} - - - name: Retag and push rhacs-eng - uses: stackrox/actions/images/retag-and-push@v1 - with: - src-image: quay.io/stackrox-io/collector-builder:${{ env.COLLECTOR_BUILDER_TAG }}-amd64 - dst-image: quay.io/rhacs-eng/collector-builder:${{ env.COLLECTOR_BUILDER_TAG }} - username: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }} - password: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }} - notify: runs-on: ubuntu-24.04 if: always() && contains(join(needs.*.result, ','), 'failure') && github.event_name != 'pull_request' needs: - build-builder-image + - build-builder-image-remote-vm - create-multiarch-manifest - - retag-x86-image steps: - name: Slack notification uses: rtCamp/action-slack-notify@v2 diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index 0a401ca01b..736f68d1cb 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -18,6 +18,11 @@ on: required: true description: | The builder tag to use in the build + architectures: + type: string + required: true + description: | + Space-seperated list of architectures to build env: COLLECTOR_TAG: ${{ inputs.collector-tag }} @@ -29,12 +34,13 @@ env: jobs: build-collector-image: - name: Build Collector - runs-on: ubuntu-24.04 + name: Local collector image ${{ matrix.arch }} strategy: - fail-fast: false matrix: - arch: [amd64, ppc64le, arm64] + arch: [amd64, arm64, ppc64le] + exclude: + - arch: ${{ contains(inputs.architectures, 'ppc64le') && '' || 'ppc64le' }} + runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }} env: PLATFORM: linux/${{ matrix.arch }} @@ -62,6 +68,7 @@ jobs: rhacs_eng_username: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }} rhacs_eng_password: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }} collector_git_ref: ${{ github.ref }} + collector_git_sha: ${{ github.sha }} collector_builder_tag: ${{ env.COLLECTOR_BUILDER_TAG }} disable_profiling: ${{ matrix.arch != 'amd64' && matrix.arch != 'arm64' }} rhacs_eng_image: ${{ env.RHACS_ENG_IMAGE }} @@ -71,11 +78,7 @@ jobs: driver_version: ${DRIVER_VERSION} EOF - - name: Build images - if: | - github.event_name != 'pull_request' || - matrix.arch == 'amd64' || - contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') + - name: Build ${{ matrix.arch }} image locally timeout-minutes: 480 run: | ansible-playbook \ @@ -87,11 +90,10 @@ jobs: ansible/ci-build-collector.yml build-collector-image-remote-vm: - name: Build Collector on a remote VM + name: Remote collector image runs-on: ubuntu-24.04 - if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') + if: contains(inputs.architectures, 's390x') strategy: - fail-fast: false matrix: arch: [s390x] @@ -168,11 +170,9 @@ jobs: - build-collector-image-remote-vm name: Create Multiarch manifest runs-on: ubuntu-24.04 - if: | - github.event_name != 'pull_request' || - contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') + if: always() && !contains(join(needs.*.result, ','), 'failure') env: - ARCHS: amd64 ppc64le s390x arm64 + ARCHS: ${{ inputs.architectures }} steps: - uses: actions/checkout@v4 @@ -203,35 +203,6 @@ jobs: base-image: quay.io/rhacs-eng/collector:${{ inputs.collector-tag }} archs: ${{ env.ARCHS }} - retag-x86-image: - needs: - - build-collector-image - name: Retag x86 image - runs-on: ubuntu-24.04 - if: | - github.event_name == 'pull_request' && - !contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') - steps: - - name: Pull image to retag - run: | - docker pull ${{ inputs.collector-image }}-amd64 - - - name: Retag and push stackrox-io - uses: stackrox/actions/images/retag-and-push@v1 - with: - src-image: ${{ inputs.collector-image }}-amd64 - dst-image: ${{ inputs.collector-image }} - username: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }} - password: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }} - - - name: Retag and push rhacs-eng - uses: stackrox/actions/images/retag-and-push@v1 - with: - src-image: ${{ inputs.collector-image }}-amd64 - dst-image: ${{ env.RHACS_ENG_IMAGE }} - username: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }} - password: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }} - notify: runs-on: ubuntu-24.04 if: always() && contains(join(needs.*.result, ','), 'failure') && github.event_name != 'pull_request' @@ -239,7 +210,6 @@ jobs: - build-collector-image - build-collector-image-remote-vm - create-multiarch-manifest - - retag-x86-image steps: - name: Slack notification uses: rtCamp/action-slack-notify@v2 diff --git a/.github/workflows/init.yml b/.github/workflows/init.yml index be09716158..b9bea60ec6 100644 --- a/.github/workflows/init.yml +++ b/.github/workflows/init.yml @@ -58,6 +58,13 @@ on: description: | Trigger rebuild of QA containers value: ${{ jobs.common-variables.outputs.rebuild-qa-containers }} + architectures: + description: | + Space-seperated list of architectures to build + value: | + ${{ ((github.event_name != 'pull_request' || + contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds')) && + 'amd64 arm64 ppc64le s390x') || 'amd64 arm64' }} jobs: common-variables: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 1290e8e7de..a8f17c96b9 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -91,9 +91,6 @@ jobs: arm64-integration-tests: uses: ./.github/workflows/integration-tests-vm-type.yml - if: | - github.event_name != 'pull_request' || inputs.is-konflux || - contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') strategy: # ensure that if one part of the matrix fails, the # rest will continue diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f002e6eb7b..c9d8e3384d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,6 +40,7 @@ jobs: needs: init with: collector-tag: ${{ needs.init.outputs.collector-tag }} + architectures: ${{ needs.init.outputs.architectures }} secrets: inherit build-collector: @@ -51,6 +52,7 @@ jobs: collector-tag: ${{ needs.init.outputs.collector-tag }} collector-image: ${{ needs.init.outputs.collector-image }} collector-builder-tag: ${{ needs.build-builder-image.outputs.collector-builder-tag }} + architectures: ${{ needs.init.outputs.architectures }} secrets: inherit build-test-containers: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5ac589df89..d13562ff21 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -11,16 +11,18 @@ on: jobs: unit-tests: - runs-on: ubuntu-24.04 container: image: quay.io/stackrox-io/collector-builder:${{ inputs.collector-builder-tag }} strategy: fail-fast: false matrix: + arch: [amd64, arm64] cmake-flags: - -DCMAKE_BUILD_TYPE=Release - -DADDRESS_SANITIZER=ON -DCMAKE_BUILD_TYPE=Debug - -DUSE_VALGRIND=ON -DCMAKE_BUILD_TYPE=Debug + runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }} + steps: - uses: actions/checkout@v4 with: From 9a78b61dce110276462f8cf7e918cdc061e2d713 Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Mon, 28 Apr 2025 13:55:32 -0700 Subject: [PATCH 03/12] matrix values cannot contain runtime computed val --- .github/workflows/collector-builder.yml | 10 ++++++++-- .github/workflows/collector.yml | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index 9ff9184782..0edd8d4891 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -31,6 +31,7 @@ jobs: outputs: build-image: ${{ steps.builder-tag.outputs.build-image || false }} collector-builder-tag: ${{ steps.builder-tag.outputs.collector-builder-tag || 'master'}} + local-exclude: ${{ steps.builder-tag.outputs.local-exclude || ''}} env: DEFAULT_BUILDER_TAG: master @@ -69,6 +70,12 @@ jobs: echo "collector-builder-tag=${COLLECTOR_BUILDER_TAG}" >> "$GITHUB_OUTPUT" echo "build-image=true" >> "$GITHUB_OUTPUT" + - name: Check arches for local build + if: ! contains(inputs.architectures, 'ppc64le') + id: arch + run: | + echo "local-exclude=[{arch:ppc64le}]" >> "$GITHUB_OUTPUT" + build-builder-image: name: Local builder image # Multiarch builds sometimes take for eeeeeeeeeever @@ -80,8 +87,7 @@ jobs: strategy: matrix: arch: [amd64, arm64, ppc64le] - exclude: - - arch: ${{ contains(inputs.architectures, 'ppc64le') && '' || 'ppc64le' }} + exclude: ${{ fromJSON(needs.builder-needs-rebuilding.outputs.local-exclude) }} runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }} env: diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index 736f68d1cb..02cd432929 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -33,13 +33,25 @@ env: ADDRESS_SANITIZER: ${{ contains(github.event.pull_request.labels.*.name, 'address-sanitizer') }} jobs: + prepare-build-collector: + name: Prepare builders for collector + runs-on: ubuntu-24.04 + outputs: + local-exclude: ${{ steps.arch.outputs.local-exclude || '' }} + + steps: + - name: Check arches for local build + if: ! contains(inputs.architectures, 'ppc64le') + id: arch + run: echo "local-exclude=[{arch:ppc64le}]" >> "$GITHUB_OUTPUT" + build-collector-image: name: Local collector image ${{ matrix.arch }} + needs: prepare-build-collector strategy: matrix: arch: [amd64, arm64, ppc64le] - exclude: - - arch: ${{ contains(inputs.architectures, 'ppc64le') && '' || 'ppc64le' }} + exclude: ${{ fromJSON(needs.prepare-build-collector.outputs.local-exclude) }} runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }} env: From 727851645ef7029a599dee97235b4b2c3150309c Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Mon, 28 Apr 2025 14:25:15 -0700 Subject: [PATCH 04/12] format --- .github/workflows/collector-builder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index 0edd8d4891..d346f5f697 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -71,7 +71,7 @@ jobs: echo "build-image=true" >> "$GITHUB_OUTPUT" - name: Check arches for local build - if: ! contains(inputs.architectures, 'ppc64le') + if: ${{ ! contains(inputs.architectures, 'ppc64le') }} id: arch run: | echo "local-exclude=[{arch:ppc64le}]" >> "$GITHUB_OUTPUT" From 058ce9eba7f14c22f28292e93aba9048b0fc80cf Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Mon, 28 Apr 2025 17:03:07 -0700 Subject: [PATCH 05/12] format --- .github/workflows/collector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index 02cd432929..9a1b6506ef 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Check arches for local build - if: ! contains(inputs.architectures, 'ppc64le') + if: ${{ ! contains(inputs.architectures, 'ppc64le') }} id: arch run: echo "local-exclude=[{arch:ppc64le}]" >> "$GITHUB_OUTPUT" From 87bd86701a03859f75d819acfb8a0af179a4618c Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Mon, 28 Apr 2025 17:04:01 -0700 Subject: [PATCH 06/12] sepArate --- .github/workflows/collector-builder.yml | 2 +- .github/workflows/collector.yml | 2 +- .github/workflows/init.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index d346f5f697..d8398c1399 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -12,7 +12,7 @@ on: type: string required: true description: | - Space-seperated list of architectures to build + Space-separated list of architectures to build outputs: collector-builder-tag: diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index 9a1b6506ef..8feefebe9c 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -22,7 +22,7 @@ on: type: string required: true description: | - Space-seperated list of architectures to build + Space-separated list of architectures to build env: COLLECTOR_TAG: ${{ inputs.collector-tag }} diff --git a/.github/workflows/init.yml b/.github/workflows/init.yml index b9bea60ec6..1db7bcd88b 100644 --- a/.github/workflows/init.yml +++ b/.github/workflows/init.yml @@ -60,7 +60,7 @@ on: value: ${{ jobs.common-variables.outputs.rebuild-qa-containers }} architectures: description: | - Space-seperated list of architectures to build + Space-separated list of architectures to build value: | ${{ ((github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds')) && From 60cbd5bced71f3d42c94e19929108c4687722c1b Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Mon, 28 Apr 2025 17:07:20 -0700 Subject: [PATCH 07/12] format --- .github/workflows/collector-builder.yml | 3 +-- .github/workflows/collector.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index d8398c1399..eb4e58ad54 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -73,8 +73,7 @@ jobs: - name: Check arches for local build if: ${{ ! contains(inputs.architectures, 'ppc64le') }} id: arch - run: | - echo "local-exclude=[{arch:ppc64le}]" >> "$GITHUB_OUTPUT" + run: echo "local-exclude=[{\"arch\":\"ppc64le\"}]" >> "$GITHUB_OUTPUT" build-builder-image: name: Local builder image diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index 8feefebe9c..9fc520b9d4 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -43,7 +43,7 @@ jobs: - name: Check arches for local build if: ${{ ! contains(inputs.architectures, 'ppc64le') }} id: arch - run: echo "local-exclude=[{arch:ppc64le}]" >> "$GITHUB_OUTPUT" + run: echo "local-exclude=[{\"arch\":\"ppc64le\"}]" >> "$GITHUB_OUTPUT" build-collector-image: name: Local collector image ${{ matrix.arch }} From a9db47c9f7b545f1dbfcafc416d8f663d5f6615b Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Mon, 28 Apr 2025 17:09:44 -0700 Subject: [PATCH 08/12] fix --- .github/workflows/collector-builder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index eb4e58ad54..7317f88cf0 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -31,7 +31,7 @@ jobs: outputs: build-image: ${{ steps.builder-tag.outputs.build-image || false }} collector-builder-tag: ${{ steps.builder-tag.outputs.collector-builder-tag || 'master'}} - local-exclude: ${{ steps.builder-tag.outputs.local-exclude || ''}} + local-exclude: ${{ steps.arch.outputs.local-exclude || '[]'}} env: DEFAULT_BUILDER_TAG: master From 014e5b96d1f268f8a4345e432047772b813072db Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Tue, 29 Apr 2025 16:11:43 -0700 Subject: [PATCH 09/12] quotes --- .github/workflows/collector-builder.yml | 2 +- .github/workflows/collector.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index 7317f88cf0..54695fa855 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -73,7 +73,7 @@ jobs: - name: Check arches for local build if: ${{ ! contains(inputs.architectures, 'ppc64le') }} id: arch - run: echo "local-exclude=[{\"arch\":\"ppc64le\"}]" >> "$GITHUB_OUTPUT" + run: echo 'local-exclude=[{"arch":"ppc64le"}]' >> "$GITHUB_OUTPUT" build-builder-image: name: Local builder image diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index 9fc520b9d4..14ab7a4705 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -43,7 +43,7 @@ jobs: - name: Check arches for local build if: ${{ ! contains(inputs.architectures, 'ppc64le') }} id: arch - run: echo "local-exclude=[{\"arch\":\"ppc64le\"}]" >> "$GITHUB_OUTPUT" + run: echo 'local-exclude=[{"arch":"ppc64le"}]' >> "$GITHUB_OUTPUT" build-collector-image: name: Local collector image ${{ matrix.arch }} From 192fb64fa2ea49d0006e41d790d88b1a4b4b9dff Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Tue, 6 May 2025 12:48:59 -0700 Subject: [PATCH 10/12] Update .github/workflows/collector.yml Co-authored-by: Mauro Ezequiel Moltrasio --- .github/workflows/collector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index 14ab7a4705..b97590eac3 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -37,7 +37,7 @@ jobs: name: Prepare builders for collector runs-on: ubuntu-24.04 outputs: - local-exclude: ${{ steps.arch.outputs.local-exclude || '' }} + local-exclude: ${{ steps.arch.outputs.local-exclude || '[]' }} steps: - name: Check arches for local build From b1a2aedbe4339ed25fff460917ed2f4902387597 Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Tue, 6 May 2025 16:28:05 -0700 Subject: [PATCH 11/12] X-Smart-Branch-Parent: rc-fix-exclude From 6c5acb97e360b444ee944b437b63374d0619247f Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Tue, 6 May 2025 16:29:21 -0700 Subject: [PATCH 12/12] testing ppc on arm runner --- .github/workflows/collector-builder.yml | 2 +- .github/workflows/collector.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index 54695fa855..8b7290a4c9 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -87,7 +87,7 @@ jobs: matrix: arch: [amd64, arm64, ppc64le] exclude: ${{ fromJSON(needs.builder-needs-rebuilding.outputs.local-exclude) }} - runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }} + runs-on: ${{ (matrix.arch == 'amd64' && 'ubuntu-24.04') || 'ubuntu-24.04-arm' }} env: PLATFORM: linux/${{ matrix.arch }} diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index b97590eac3..4adcd6fcf1 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -52,7 +52,7 @@ jobs: matrix: arch: [amd64, arm64, ppc64le] exclude: ${{ fromJSON(needs.prepare-build-collector.outputs.local-exclude) }} - runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }} + runs-on: ${{ (matrix.arch == 'amd64' && 'ubuntu-24.04') || 'ubuntu-24.04-arm' }} env: PLATFORM: linux/${{ matrix.arch }}