Skip to content

Commit ca60bc8

Browse files
committed
Earthfile is self-documenting
1 parent e49fdb5 commit ca60bc8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Earthfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ VERSION 0.8
22
FROM eclipse-temurin:21-jdk-jammy
33
WORKDIR /code
44

5+
# build-with-gradle builds and tests with Gradle, and saves the build/ directory
56
build-with-gradle:
67
COPY gradlew .
78
COPY gradle gradle
@@ -16,11 +17,13 @@ build-with-gradle:
1617
# Just copy everything rather than maintain a whitelist of files/dirs.
1718
SAVE ARTIFACT --keep-ts build AS LOCAL build
1819

20+
# run-with-gradle runs the demo program with Gradle, building if needed
1921
run-with-gradle:
2022
FROM +build-with-gradle
2123
COPY run-with-gradle.sh .
2224
RUN ./run-with-gradle.sh
2325

26+
# build-with-maven builds and tests with Maven, and saves the target/ directory
2427
build-with-maven:
2528
COPY mvnw .
2629
COPY .mvn .mvn
@@ -33,15 +36,18 @@ build-with-maven:
3336
# Just copy everything rather than maintain a whitelist of files/dirs.
3437
SAVE ARTIFACT --keep-ts target AS LOCAL target
3538

39+
# run-with-maven runs the demo program with Maven, building if needed
3640
run-with-maven:
3741
FROM +build-with-maven
3842
COPY run-with-maven.sh .
3943
RUN ./run-with-maven.sh
4044

45+
# build executes both +build-with-gradle and +build-with-maven targets
4146
build:
4247
BUILD +build-with-gradle
4348
BUILD +build-with-maven
4449

50+
# run executes both +run-with-gradle and +run-with-maven targets
4551
run:
4652
BUILD +run-with-gradle
4753
BUILD +run-with-maven

0 commit comments

Comments
 (0)