Skip to content

[SERV-1012] Add error logging #252

[SERV-1012] Add error logging

[SERV-1012] Add error logging #252

Workflow file for this run

name: Maven PR Build
# We require all commits go through PR on GitHub
on:
push:
branches:
- SERV-1012
jobs:
build:
name: Maven PR Builder (JDK ${{ matrix.java }} with ${{ matrix.build_property }})
runs-on: macos-14
strategy:
matrix:
java: [ 11, 17 ]
build_property: ["ignored.version"]
steps:
- name: Check out code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 # v1
with:
java-version: ${{ matrix.java }}
cache: maven
- name: Install Kakadu SSH key
uses: webfactory/ssh-agent@ee29fafb6aa450493bac9136b346e51ea60a8b5e # v0.4.1
env:
KAKADU_PRIVATE_SSH_KEY: ${{ secrets.KAKADU_PRIVATE_SSH_KEY }}
if: ${{ matrix.build_property == 'kakadu.version' && env.KAKADU_PRIVATE_SSH_KEY != null }}
with:
ssh-private-key: ${{ secrets.KAKADU_PRIVATE_SSH_KEY }}
- name: Set up Docker environment
run: |
brew install colima docker
- name: Workaround for https://github.com/abiosoft/colima/issues/777
run: |
brew uninstall --ignore-dependencies qemu #required to uninstall
arch -arm64 brew install qemu
qemu-img --version
- name: Start Colima with error logging
id: maybe_fails
run: |
colima start --arch aarch64 2> errors.txt || true
echo ::set-output name=errors::`cat errors.txt`
colima start --arch aarch64
# sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: use error detail on failure
if: ${{ failure() }}
run: |
echo ${{ steps.maybe_fails.outputs.errors }}
- name: Check that Docker functions
run: docker ps
- name: Build with Maven
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 # v1.4.0
env:
KAKADU_PRIVATE_SSH_KEY: ${{ secrets.KAKADU_PRIVATE_SSH_KEY }}
if: |
(matrix.build_property == 'kakadu.version' && env.KAKADU_PRIVATE_SSH_KEY != null) ||
matrix.build_property != 'kakadu.version'
with:
maven_goals_phases: "clean verify"
maven_profiles: default,${{ secrets.BUILD_PROFILES }}
maven_args: >
-V -ntp -Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=error -DlogLevel=DEBUG -DtestLogLevel=DEBUG
-D${{ matrix.build_property }}=${{ secrets.KAKADU_VERSION }}
- name: Cleanup Colima
run: |
colima rm --all