Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: create a docker image for arm64 as well #118

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 56 additions & 8 deletions .github/workflows/reusable-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64'
- name: Download jar
uses: actions/download-artifact@v3
with:
Expand All @@ -202,7 +206,7 @@ jobs:
cp log4j2.yaml assets
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
- name: Build for amd64
uses: docker/build-push-action@v3
with:
push: false
Expand All @@ -212,13 +216,32 @@ jobs:
labels: |
org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }}
org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }}
outputs: type=docker,dest=/tmp/bf.tar
platforms: linux/amd64
outputs: type=docker,dest=/tmp/bf-amd64.tar
context: .
- name: Upload docker image
- name: Upload linux/amd64 docker image
uses: actions/upload-artifact@v3
with:
name: bf_image
path: /tmp/bf.tar
path: /tmp/bf-amd64.tar
- name: Build for arm64
uses: docker/build-push-action@v3
with:
push: false
file: batfish.dockerfile
build-args: ASSETS=./assets
tags: batfish/batfish:test-${{ needs.bf_version.outputs.bf_version }}
labels: |
org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }}
org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }}
platforms: linux/arm64
outputs: type=docker,dest=/tmp/bf-arm64.tar
context: .
- name: Upload linux/arm64 docker image
uses: actions/upload-artifact@v3
with:
name: bf_image
path: /tmp/bf-arm64.tar
allinone_image_build:
runs-on: ubuntu-latest
needs:
Expand All @@ -228,6 +251,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64'
- name: Download jar
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -258,7 +285,27 @@ jobs:
cp wrapper.sh assets
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
- name: Build for linux/amd64
uses: docker/build-push-action@v3
with:
push: false
file: allinone.dockerfile
build-args: ASSETS=./assets
tags: batfish/allinone:test-${{ needs.bf_version.outputs.bf_version }}
labels: |
org.batfish.allinone-tag=${{ needs.bf_version.outputs.bf_sha }}_${{ needs.bf_version.outputs.pybf_sha }}
org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }}
org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }}
org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }}
platforms: linux/amd64
outputs: type=docker,dest=/tmp/allinone-amd64.tar
context: .
- name: Upload linux/amd64 docker image
uses: actions/upload-artifact@v3
with:
name: allinone_image
path: /tmp/allinone-amd64.tar
- name: Build for linux/arm64
uses: docker/build-push-action@v3
with:
push: false
Expand All @@ -270,10 +317,11 @@ jobs:
org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }}
org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }}
org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }}
outputs: type=docker,dest=/tmp/allinone.tar
platforms: linux/arm64
outputs: type=docker,dest=/tmp/allinone-arm64.tar
context: .
- name: Upload docker image
- name: Upload linux/arm64 docker image
uses: actions/upload-artifact@v3
with:
name: allinone_image
path: /tmp/allinone.tar
path: /tmp/allinone-arm64.tar