Skip to content

Commit

Permalink
OPSEXP-2818 Add arm64 build and test (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius authored Sep 13, 2024
1 parent 9548129 commit e2979b9
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions tengine/aio/entrypoint.sh
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
6 changes: 6 additions & 0 deletions tengine/libreoffice/entrypoint.sh
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
3 changes: 2 additions & 1 deletion test/helm/test-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ alfresco-transform-service:
image:
repository: localhost/alfresco-shared-file-store
tag: latest
#alfresco-sync-service:
alfresco-sync-service:
enabled: false ## disable till release of 5.0.1
dtas:
additionalArgs:
- --tb=short
Expand Down

0 comments on commit e2979b9

Please sign in to comment.