CI-Build #1037
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
name: CI-Build | |
on: | |
push: | |
schedule: | |
- cron: '21 21 * * *' | |
workflow_dispatch: | |
workflow_call: | |
inputs: | |
mvnArgs: | |
type: string | |
default: '-Divy.engine.download.url=https://dev.axonivy.com/permalink/nightly-10/axonivy-engine.zip' | |
required: false | |
javaVersion: | |
type: number | |
default: 17 | |
mvnVersion: | |
type: string | |
default: 3.6.3 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ inputs.javaVersion || '17' }} | |
distribution: temurin | |
- name: Decide to deploy or not | |
uses: haya14busa/action-cond@v1 | |
id: condval | |
with: | |
cond: ${{ contains('refs/heads/master refs/heads/release/', github.ref) }} | |
if_false: "deploy -DaltSnapshotDeploymentRepository=nexus.axonivy.com::https://nexus.axonivy.com/repository/maven-snapshots/" | |
if_true: verify | |
- name: Provide maven repository credentials | |
uses: s4u/[email protected] | |
with: | |
servers: | | |
[{ | |
"id": "nexus.axonivy.com", | |
"username": "${{ secrets.NEXUS_AXONIVY_COM_USER }}", | |
"password": "${{ secrets.NEXUS_AXONIVY_COM_PASSWORD }}" | |
}] | |
- name: Setup Maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: ${{ inputs.mvnVersion || '3.6.3' }} | |
- name: Build with Maven | |
run: mvn clean ${{ steps.condval.outputs.value }} --batch-mode --fail-at-end ${{ inputs.mvnArgs }} | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
junit_files: | | |
*/target/*-reports/*.xml | |
!*/target/*-reports/failsafe-summary.xml | |
- name: Archive build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
*/target/*.iar | |
*/target/*-[0-9]*.jar | |
*product/target/*.zip | |
- name: Archive test reports | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test-reports | |
retention-days: 5 | |
path: | | |
*/target/testEngineOut.log | |
*/target/selenide/* | |
*/target/ivyEngine/deploy/*/*.deploymentLog |