From 63638578bd259da15d83150e4026088ce2a60595 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 24 Nov 2023 09:21:00 +0000 Subject: [PATCH] Parametrize build platforms Signed-off-by: Pedro Algarvio --- .github/workflows/.container.template.j2 | 27 +++++-------- .github/workflows/almalinux-containers.yml | 20 ++++------ .github/workflows/amazonlinux-containers.yml | 20 ++++------ .github/workflows/archlinux-containers.yml | 20 ++++------ .github/workflows/busybox-containers.yml | 20 ++++------ .github/workflows/centos-containers.yml | 20 ++++------ .../workflows/centos-stream-containers.yml | 20 ++++------ .github/workflows/consul-containers.yml | 20 ++++------ .github/workflows/debian-containers.yml | 20 ++++------ .github/workflows/etcd-v2-containers.yml | 20 ++++------ .github/workflows/etcd-v3-containers.yml | 20 ++++------ .github/workflows/fedora-containers.yml | 20 ++++------ .github/workflows/mariadb-containers.yml | 20 ++++------ .github/workflows/mysql-server-containers.yml | 20 ++++------ .../workflows/openldap-minion-containers.yml | 20 ++++------ .github/workflows/opensuse-containers.yml | 20 ++++------ .github/workflows/packaging-containers.yml | 20 ++++------ .github/workflows/percona-containers.yml | 20 ++++------ .github/workflows/photon-containers.yml | 20 ++++------ .github/workflows/python-containers.yml | 20 ++++------ .github/workflows/rabbitmq-containers.yml | 20 ++++------ .github/workflows/redis-containers.yml | 20 ++++------ .github/workflows/salt-containers.yml | 20 ++++------ .../workflows/salt-gitfs-http-containers.yml | 20 ++++------ .github/workflows/ssh-minion-containers.yml | 20 ++++------ .github/workflows/tinyproxy-containers.yml | 20 ++++------ .github/workflows/ubuntu-containers.yml | 20 ++++------ .github/workflows/vault-containers.yml | 20 ++++------ .github/workflows/virt-minion-containers.yml | 20 ++++------ .github/workflows/zookeeper-containers.yml | 20 ++++------ tasks/containers.py | 40 +++++++++++++++---- 31 files changed, 246 insertions(+), 401 deletions(-) diff --git a/.github/workflows/.container.template.j2 b/.github/workflows/.container.template.j2 index 6128998..3c500a1 100644 --- a/.github/workflows/.container.template.j2 +++ b/.github/workflows/.container.template.j2 @@ -52,15 +52,23 @@ jobs: run: | python -m pip install -r requirements.txt + <%- if multiarch %> + + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + + <%- endif %> + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }}<%- if multiarch %> --multiarch --exclude-platforms=<{ exclude_platforms }><%- endif %> mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }}<%- if multiarch %> (${{ matrix.dockerinfo.platform }})<%- endif %>" strategy: fail-fast: false max-parallel: 4 @@ -117,19 +125,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" -<%- if multiarch %> - - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=<{ exclude_platforms }> source-container-inspect.txt -<%- endif %> - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -143,7 +138,7 @@ jobs: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} <%- if multiarch %> - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} <%- endif %> push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | diff --git a/.github/workflows/almalinux-containers.yml b/.github/workflows/almalinux-containers.yml index 4d43c6e..f1620fb 100644 --- a/.github/workflows/almalinux-containers.yml +++ b/.github/workflows/almalinux-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/amazonlinux-containers.yml b/.github/workflows/amazonlinux-containers.yml index 81a339d..ffce086 100644 --- a/.github/workflows/amazonlinux-containers.yml +++ b/.github/workflows/amazonlinux-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/archlinux-containers.yml b/.github/workflows/archlinux-containers.yml index f316d33..7ac9713 100644 --- a/.github/workflows/archlinux-containers.yml +++ b/.github/workflows/archlinux-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/busybox-containers.yml b/.github/workflows/busybox-containers.yml index 662ef4f..4afe8c7 100644 --- a/.github/workflows/busybox-containers.yml +++ b/.github/workflows/busybox-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/centos-containers.yml b/.github/workflows/centos-containers.yml index ff5bae1..2ba7852 100644 --- a/.github/workflows/centos-containers.yml +++ b/.github/workflows/centos-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/centos-stream-containers.yml b/.github/workflows/centos-stream-containers.yml index 6c7868e..292b486 100644 --- a/.github/workflows/centos-stream-containers.yml +++ b/.github/workflows/centos-stream-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/consul-containers.yml b/.github/workflows/consul-containers.yml index 57ead67..1357820 100644 --- a/.github/workflows/consul-containers.yml +++ b/.github/workflows/consul-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/debian-containers.yml b/.github/workflows/debian-containers.yml index 84e70d9..e5da9cf 100644 --- a/.github/workflows/debian-containers.yml +++ b/.github/workflows/debian-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le,linux/ppc64le,linux/arm/v5 mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le,linux/ppc64le,linux/arm/v5 source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/etcd-v2-containers.yml b/.github/workflows/etcd-v2-containers.yml index 40cbdf3..3dfd3ee 100644 --- a/.github/workflows/etcd-v2-containers.yml +++ b/.github/workflows/etcd-v2-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/etcd-v3-containers.yml b/.github/workflows/etcd-v3-containers.yml index c04a609..d5d2c93 100644 --- a/.github/workflows/etcd-v3-containers.yml +++ b/.github/workflows/etcd-v3-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/fedora-containers.yml b/.github/workflows/fedora-containers.yml index 5c66f39..767faf0 100644 --- a/.github/workflows/fedora-containers.yml +++ b/.github/workflows/fedora-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/mariadb-containers.yml b/.github/workflows/mariadb-containers.yml index e53790b..19f3418 100644 --- a/.github/workflows/mariadb-containers.yml +++ b/.github/workflows/mariadb-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/mysql-server-containers.yml b/.github/workflows/mysql-server-containers.yml index ef53a7e..41a9dd8 100644 --- a/.github/workflows/mysql-server-containers.yml +++ b/.github/workflows/mysql-server-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/openldap-minion-containers.yml b/.github/workflows/openldap-minion-containers.yml index d80fd39..859bd41 100644 --- a/.github/workflows/openldap-minion-containers.yml +++ b/.github/workflows/openldap-minion-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/opensuse-containers.yml b/.github/workflows/opensuse-containers.yml index 110e1e4..22dfc61 100644 --- a/.github/workflows/opensuse-containers.yml +++ b/.github/workflows/opensuse-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/packaging-containers.yml b/.github/workflows/packaging-containers.yml index ccdda64..81e7861 100644 --- a/.github/workflows/packaging-containers.yml +++ b/.github/workflows/packaging-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le,linux/386,linux/arm/v5,linux/arm/v7 mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le,linux/386,linux/arm/v5,linux/arm/v7 source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/percona-containers.yml b/.github/workflows/percona-containers.yml index a6bbab9..35ca2f8 100644 --- a/.github/workflows/percona-containers.yml +++ b/.github/workflows/percona-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/photon-containers.yml b/.github/workflows/photon-containers.yml index 76cf6b0..d74543e 100644 --- a/.github/workflows/photon-containers.yml +++ b/.github/workflows/photon-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le,linux/ppc64le,linux/arm/v5 mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le,linux/ppc64le,linux/arm/v5 source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/python-containers.yml b/.github/workflows/python-containers.yml index 8b4d3b1..315a836 100644 --- a/.github/workflows/python-containers.yml +++ b/.github/workflows/python-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/rabbitmq-containers.yml b/.github/workflows/rabbitmq-containers.yml index 0861b94..dc491fe 100644 --- a/.github/workflows/rabbitmq-containers.yml +++ b/.github/workflows/rabbitmq-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/redis-containers.yml b/.github/workflows/redis-containers.yml index 73edd62..f721a19 100644 --- a/.github/workflows/redis-containers.yml +++ b/.github/workflows/redis-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/salt-containers.yml b/.github/workflows/salt-containers.yml index b25f5d1..b481819 100644 --- a/.github/workflows/salt-containers.yml +++ b/.github/workflows/salt-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/salt-gitfs-http-containers.yml b/.github/workflows/salt-gitfs-http-containers.yml index e0bbccc..c9a7814 100644 --- a/.github/workflows/salt-gitfs-http-containers.yml +++ b/.github/workflows/salt-gitfs-http-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/ssh-minion-containers.yml b/.github/workflows/ssh-minion-containers.yml index 97c8fe8..4e9127e 100644 --- a/.github/workflows/ssh-minion-containers.yml +++ b/.github/workflows/ssh-minion-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/tinyproxy-containers.yml b/.github/workflows/tinyproxy-containers.yml index 5ed02be..5297d7d 100644 --- a/.github/workflows/tinyproxy-containers.yml +++ b/.github/workflows/tinyproxy-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/ubuntu-containers.yml b/.github/workflows/ubuntu-containers.yml index 1b22d7a..9c60f2b 100644 --- a/.github/workflows/ubuntu-containers.yml +++ b/.github/workflows/ubuntu-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/vault-containers.yml b/.github/workflows/vault-containers.yml index a87c4a6..7c05cf3 100644 --- a/.github/workflows/vault-containers.yml +++ b/.github/workflows/vault-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/virt-minion-containers.yml b/.github/workflows/virt-minion-containers.yml index a070455..1fd9e07 100644 --- a/.github/workflows/virt-minion-containers.yml +++ b/.github/workflows/virt-minion-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/.github/workflows/zookeeper-containers.yml b/.github/workflows/zookeeper-containers.yml index 7689737..1c54080 100644 --- a/.github/workflows/zookeeper-containers.yml +++ b/.github/workflows/zookeeper-containers.yml @@ -52,15 +52,19 @@ jobs: run: | python -m pip install -r requirements.txt + - name: "Docker BuildX" + id: buildx + uses: docker/setup-buildx-action@v2 + - name: "Generate Matrix Data" id: set-matrix run: | - inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} + inv containers.matrix --from-workflow ${{ env.PATH_IN_REPO }} --multiarch --exclude-platforms=linux/s390x,linux/mips64le mirror-image: runs-on: ubuntu-latest needs: matrix-generator - name: "${{ matrix.dockerinfo.name }}" + name: "${{ matrix.dockerinfo.name }} (${{ matrix.dockerinfo.platform }})" strategy: fail-fast: false max-parallel: 4 @@ -117,16 +121,6 @@ jobs: echo "Flags: ${{ steps.buildx.outputs.flags }}" echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - - name: Inspect Source Image - run: | - set -o pipefail - docker buildx imagetools inspect ${{ matrix.dockerinfo.source_container }} | tee -a source-container-inspect.txt - - - name: Define Build Platforms - id: define-platforms - run: | - inv containers.platforms --exclude=linux/s390x,linux/mips64le source-container-inspect.txt - - name: "Log into GitHub Container Registry" uses: docker/login-action@v2 with: @@ -139,7 +133,7 @@ jobs: with: file: ${{ matrix.dockerinfo.file }} context: ${{ env.PATH_IN_REPO }} - platforms: ${{ steps.define-platforms.outputs.platforms }} + platforms: ${{ matrix.dockerinfo.platform }} push: ${{ github.repository == 'saltstack/salt-ci-containers' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) }} tags: | ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }} diff --git a/tasks/containers.py b/tasks/containers.py index 457e31b..43d9af9 100644 --- a/tasks/containers.py +++ b/tasks/containers.py @@ -173,13 +173,18 @@ def generate(ctx, ghcr_org="saltstack/salt-ci-containers"): @task -def matrix(ctx, image, from_workflow=False): +def matrix(ctx, image, from_workflow=False, multiarch=False, exclude_platforms=None): """ Generate the container mirrors. """ ctx.cd(utils.REPO_ROOT) mirrors_path = utils.REPO_ROOT / image + if exclude_platforms is None: + excludes = [] + else: + excludes = exclude_platforms.split(",") + for name, details in _get_containers(): if details["path"] == image: break @@ -193,13 +198,32 @@ def matrix(ctx, image, from_workflow=False): source_container = f"{details['container']}:{source_tag}" else: source_container = _get_source_container(fpath) - output.append( - { - "name": f"{details['name']}:{fpath.stem}", - "file": str(fpath.relative_to(utils.REPO_ROOT)), - "source_container": source_container, - } - ) + + if multiarch: + ret = ctx.run(f"docker buildx imagetools inspect --raw {source_container}", echo=False) + data = json.loads(ret.stdout) + for entry in data.get("manifests"): + platform = "{os}/{architecture}".format(**entry["platform"]) + if "variant" in entry["platform"]: + platform += f"/{entry['platform']['variant']}" + if platform in excludes: + continue + output.append( + { + "name": f"{details['name']}:{fpath.stem}", + "platform": platform, + "file": str(fpath.relative_to(utils.REPO_ROOT)), + "source_container": source_container, + } + ) + else: + output.append( + { + "name": f"{details['name']}:{fpath.stem}", + "file": str(fpath.relative_to(utils.REPO_ROOT)), + "source_container": source_container, + } + ) utils.info("Generated Matrix:") utils.write_message(pprint.pformat(output))