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

feat: parallelise image build process #342

Open
wants to merge 6 commits into
base: main
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
42 changes: 26 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
run: |
cargo install bpf-linker

# TODO: Once we migrate the controller from Go to Rust,
# add the controller build step here.

- name: Build all rust crates (dataplane, test server)
run: |
make build
Expand All @@ -51,8 +48,9 @@ jobs:
- name: Run Tests
run: |
make test
docker-build:
name: docker-build

docker-build-amd64:
name: docker-build-amd64
runs-on: ubuntu-22.04
steps:
- name: Checkout
Expand All @@ -65,22 +63,34 @@ jobs:
- 'dataplane/**'
containerfile:
- 'build/Containerfile.dataplane'
- name: Setup QEMU
if: steps.filter.outputs.dataplane || steps.filter.outputs.containerfile
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3.4.0
- name: Setup Docker Buildx
- name: Build container image for amd64
if: steps.filter.outputs.dataplane || steps.filter.outputs.containerfile
id: buildx
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
buildkitd-flags: "--debug"
- name: Build multi-arch container image
push: false
context: .
file: build/Containerfile.dataplane
tags: kong/blixt-dataplane:pr-${{ github.event.pull_request.number }}-amd64-${{ github.sha }}

docker-build-arm64:
name: docker-build-arm64
runs-on: ubuntu-22.04-arm
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: dorny/paths-filter@v3
shaneutt marked this conversation as resolved.
Show resolved Hide resolved
id: filter
with:
filters: |
dataplane:
- 'dataplane/**'
containerfile:
- 'build/Containerfile.dataplane'
- name: Build container image for arm64
if: steps.filter.outputs.dataplane || steps.filter.outputs.containerfile
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
with:
push: false
builder: ${{ steps.buildx.outputs.name }}
context: .
platforms: linux/amd64,linux/arm64
file: build/Containerfile.dataplane
tags: kong/blixt-dataplane:pr-${{ github.event.pull_request.number }}-${{ github.sha }}
tags: kong/blixt-dataplane:pr-${{ github.event.pull_request.number }}-arm64-${{ github.sha }}
Loading