-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-2818 Add arm64 build and test (#44)
- Loading branch information
Showing
4 changed files
with
38 additions
and
3 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 |
---|---|---|
|
@@ -116,9 +116,12 @@ jobs: | |
comment_on_pr: false | ||
|
||
- name: Bake Docker images | ||
env: | ||
TARGETARCH: linux/amd64,linux/arm64 | ||
uses: docker/bake-action@a4d7f0b5b91c14a296d792d4ec53a9db17f02e67 # v5.5.0 | ||
with: | ||
push: true | ||
set: | | ||
*.output=type=registry,push=true | ||
- name: Show all built images | ||
run: docker images | ||
|
@@ -150,9 +153,13 @@ jobs: | |
|
||
|
||
helm-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: [arm64, amd64] | ||
name: helm test | ||
needs: build-test | ||
runs-on: alfrescoPub-ubuntu2204-16G-4CPU | ||
runs-on: ${{ matrix.arch == 'arm64' && 'alfrescoARM-ubuntu2404-16G-4CPU' || 'alfrescoPub-ubuntu2204-16G-4CPU' }} | ||
steps: | ||
- name: Setup cluster | ||
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
|
@@ -239,6 +246,21 @@ jobs: | |
kubectl get all --all-namespaces | ||
kubectl describe pod | ||
- name: Collect logs from all containers | ||
if: always() && steps.helm_install.outcome != 'skipped' | ||
run: | | ||
mkdir -p logs | ||
for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do | ||
kubectl logs $pod -n default > logs/${pod}.log | ||
done | ||
- name: Upload logs as artifact | ||
if: always() && steps.helm_install.outcome != 'skipped' | ||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0 | ||
with: | ||
name: k8s-logs-${{ matrix.arch }} | ||
path: logs | ||
|
||
- name: Run helm test | ||
id: helm_test | ||
run: helm test acs | ||
|
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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# Check if the architecture is ARM64 (aarch64) | ||
if [[ "$(uname -m)" != "x86_64" ]]; then | ||
export LIBREOFFICE_HOME=${LIBREOFFICE_HOME:=/usr/lib64/libreoffice} | ||
fi | ||
|
||
exec java $JAVA_OPTS $JAVA_OPTS_CONTAINER_FLAGS -jar /opt/app.jar |
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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# Check if the architecture is ARM64 (aarch64) | ||
if [[ "$(uname -m)" != "x86_64" ]]; then | ||
export LIBREOFFICE_HOME=${LIBREOFFICE_HOME:=/usr/lib64/libreoffice} | ||
fi | ||
|
||
exec java $JAVA_OPTS $JAVA_OPTS_CONTAINER_FLAGS -jar /opt/app.jar |
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