-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb23fcd
commit 6baf4a9
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
name: Multi-Arch Images Test | ||
|
||
on: | ||
push: | ||
branches: [ "multi-arch-images" ] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: | ||
- amd64 | ||
- arm64 | ||
name: Build Docker Images for ${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
cache: maven | ||
- name: Set Image Tag | ||
run: | | ||
echo "BUILD_IMAGE_TAG=${GITHUB_REF_NAME}-${GITHUB_SHA}" >> $GITHUB_ENV | ||
- name: Set up QEMU | ||
if: matrix.arch == 'arm64' | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: ${{ matrix.arch }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
install: true | ||
- name: Build with Maven | ||
run: | | ||
mvn -s .github/ci-maven-settings.xml -B clean package -Dnative \ | ||
${{ matrix.arch == 'arm64' && '-Dquarkus.native.additional-build-args=-H:PageSize=65536' || '' }} \ | ||
-Dquarkus.container-image.registry=ghcr.io | ||
-Dquarkus.container-image.group=ozangunalp | ||
-Dquarkus.native.container-build=true \ | ||
-Dquarkus.native.container-runtime-options=--platform=linux/${{ matrix.arch }} \ | ||
-Dquarkus.docker.buildx.platform=linux/${{ matrix.arch }} | ||
-Dquarkus.container-image.build=true \ | ||
-Dquarkus.container-image.push=false \ | ||
-Dquarkus.container-image.tag=${{ env.BUILD_IMAGE_TAG }} \ | ||
-Dquarkus.container-image.additional-tags=latest-snapshot | ||
- name: Inspect Image | ||
run: docker inspect ghcr.io/ozangunalp/kafka-native:${{ env.BUILD_IMAGE_TAG }} | ||
- name: Integration Tests with Maven | ||
run: | | ||
mvn -s .github/ci-maven-settings.xml -B \ | ||
clean verify -Dtest-container \ | ||
-Dkafka-native-container-image=ghcr.io/ozangunalp/kafka-native \ | ||
-Dkafka-native-container-version=${{ env.BUILD_IMAGE_TAG }} \ | ||
-Dzookeeper-native-container-image=ghcr.io/ozangunalp/zookeeper-native \ | ||
-Dzookeeper-native-container-version=${{ env.BUILD_IMAGE_TAG }} | ||
- name: Save kafka-native native image ${{ matrix.arch }} | ||
uses: ishworkh/container-image-artifact-upload@v1 | ||
with: | ||
image: "ghcr.io/ozangunalp/kafka-native:${{ env.BUILD_IMAGE_TAG }}-${{ matrix.arch }}" | ||
- name: Save zookeeper-native native image ${{ matrix.arch }} | ||
uses: ishworkh/container-image-artifact-upload@v1 | ||
with: | ||
image: "ghcr.io/ozangunalp/zookeeper-native:${{ env.BUILD_IMAGE_TAG }}-${{ matrix.arch }}" |