-
Notifications
You must be signed in to change notification settings - Fork 18
81 lines (70 loc) · 3.19 KB
/
pr-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: PR Build
on:
pull_request:
branches: [main]
jobs:
build-simplatform:
name: Building Simplatform
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'semeru'
cache: maven
- name: Print Githash
run: |
echo $GITHUB_SHA > ./simplatform.githash
- name: Building galasa-simplatform-application using maven
run: |
set -o pipefail
mvn -f galasa-simplatform-application/pom.xml -X deploy -Dgpg.skip=true \
-Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/obr \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file:${{ github.workspace }}/repo \
--batch-mode --errors --fail-at-end \
--settings ${{github.workspace}}/settings.xml 2>&1 | tee galasa-simplatform-application-build.log
- name: Upload galasa-simplatform-application Maven Build Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: galasa-simplatform-application-build-log
path: galasa-simplatform-application-build.log
retention-days: 7
- name: Building galasa-simbank-tests using maven
run: |
set -o pipefail
mvn -f galasa-simbank-tests/pom.xml -X deploy -Dgpg.skip=true \
-Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/obr \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file:${{ github.workspace }}/repo \
--batch-mode --errors --fail-at-end \
--settings ${{github.workspace}}/settings.xml 2>&1 | tee galasa-simbank-tests-build.log
- name: Upload galasa-simbank-tests Maven Build Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: galasa-simbank-tests-build-log
path: galasa-simbank-tests-build.log
retention-days: 7
- name: Build Simplatform image for testing
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/dockerfile.simplatform
load: true
tags: simplatform-maven-artefacts:test
build-args: |
baseVersion=latest
dockerRepository=ghcr.io
branch=main
- name: Build Simplatform jar image for testing
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/dockerfile.simplatform-amd64
load: true
tags: simplatform-jar:test