forked from binkley/modern-java-practices
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbatect.yml
More file actions
50 lines (49 loc) · 1.52 KB
/
Copy pathbatect.yml
File metadata and controls
50 lines (49 loc) · 1.52 KB
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
containers:
build-env:
image: eclipse-temurin:17-jdk-focal
environment:
# Needed for Gradle: Maven handles this via `.mvn/jvm.config`
JAVA_OPTS: --add-opens java.base/java.lang=ALL-UNNAMED
run_as_current_user:
enabled: true
home_directory: /home/container-user
volumes:
- local: .
container: /code
options: cached
- local: ~/.gradle
container: /home/container-user/.gradle
options: cached
- local: ~/.m2
container: /home/container-user/.m2
options: cached
working_directory: /code
tasks:
# NB -- local build need "clean", but CI (GitHub actions) does not:
# Docker copies in the local repo clone, including any artifacts such as
# build/ or target/ directories; CI starts from a fresh clone
build-with-gradle:
description: Build and test with Gradle
run:
container: build-env
command: ./gradlew --no-daemon --warning-mode=all clean build
build-with-maven:
description: Build and test with Maven
run:
container: build-env
command: ./mvnw --no-transfer-progress clean verify
run-with-gradle:
description: Runs the demo program assuming a Gradle build
run:
container: build-env
command: ./run.sh -B gradle
run-with-maven:
description: Runs the demo program assuming a Maven build
run:
container: build-env
command: ./run.sh -B maven
shell:
description: Open a shell in the container
run:
container: build-env
command: /bin/bash