forked from galasa-dev/managers
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 2.04 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
#
# Copyright contributors to the Galasa project
#
# SPDX-License-Identifier: EPL-2.0
#
name: PR build
on:
pull_request:
branches: [main]
jobs:
build-managers:
name: Build Managers source code and Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'semeru'
- name: Print githash
run: |
echo $GITHUB_SHA > ./managers.githash
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.9
cache-disabled: true
- name: Build Managers source code
run: |
set -o pipefail
gradle -b galasa-managers-parent/build.gradle check publish --info \
--no-daemon --console plain \
-Dorg.gradle.jvmargs=-Xmx4096M \
-PsourceMaven=https://development.galasa.dev/main/maven-repo/extensions \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=${{ github.workspace }}/repo 2>&1 | tee build.log
- name: Upload Gradle Build Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: gradle-build-log
path: build.log
retention-days: 7
- name: Upload Jacoco Report
if: failure()
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: ${{ github.workspace }}/galasa-managers-parent/**/**/build/reports/**/*.html
retention-days: 7
if-no-files-found: ignore
- name: Build Managers image for testing
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/dockerfile
load: true
tags: managers:test
build-args: |
dockerRepository=ghcr.io
tag=main