Skip to content

Commit de4bb20

Browse files
committed
For #607. Save all build output
1 parent 294e71f commit de4bb20

File tree

1 file changed

+7
-31
lines changed

1 file changed

+7
-31
lines changed

Earthfile

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,15 @@ build-with-gradle:
1212
COPY src src
1313
RUN --secret OWASP_NVD_API_KEY ./gradlew clean build
1414

15+
# For CI so that GitHub can copy artifacts:
16+
# Just copy everything rather than maintain a whitelist of files/dirs.
17+
SAVE ARTIFACT --keep-ts build AS LOCAL build
18+
1519
run-with-gradle:
1620
FROM +build-with-gradle
1721
COPY run-with-gradle.sh .
1822
RUN ./run-with-gradle.sh
1923

20-
# For CI so that GitHub can copy artifacts
21-
# Coverage reports
22-
SAVE ARTIFACT --keep-ts build/reports/jacoco/test/ AS LOCAL build/reports/jacoco/test/
23-
# Javadocs and jars
24-
SAVE ARTIFACT --keep-ts build/libs/modern-java-practices-0-javadoc.jar
25-
SAVE ARTIFACT --keep-ts build/docs/javadoc/ AS LOCAL build/docs/javadoc/
26-
27-
# Test coverage and badge for Gradle:
28-
# You need to PICK ONE from Gradle or Maven for your build.
29-
# This project uses Maven (see below) to create the code coverage badge to
30-
# avoid multiple updating.
31-
# Commented is the minimum needed from the containerized build when using
32-
# Gradle.
33-
# After this enabling this, you still need to update the GitHub action steps
34-
# to generate the badge using a custom path to the CVS report.
35-
# SAVE ARTIFACT --save-ts build/reports/jacoco/test/jacocoTestReport.csv AS LOCAL build/reports/jacoco/test/jacocoTestReport.csv
36-
3724
build-with-maven:
3825
COPY mvnw .
3926
COPY .mvn .mvn
@@ -42,20 +29,9 @@ build-with-maven:
4229
COPY src src
4330
RUN --secret OWASP_NVD_API_KEY ./mvnw --no-transfer-progress clean verify
4431

45-
# For CI so that GitHub can copy artifacts
46-
# Coverage reports
47-
SAVE ARTIFACT --keep-ts target/site/jacoco/
48-
# Javadocs and jars
49-
SAVE ARTIFACT --keep-ts target/modern-java-practices-0-SNAPSHOT-javadoc.jar AS LOCAL target/modern-java-practices-0-SNAPSHOT-javadoc.jar
50-
SAVE ARTIFACT --keep-ts target/apidocs/ AS LOCAL target/apidocs/
51-
SAVE ARTIFACT --keep-ts target/modern-java-practices-0-SNAPSHOT-test-javadoc.jar AS LOCAL target/modern-java-practices-0-SNAPSHOT-test-javadoc.jar
52-
SAVE ARTIFACT --keep-ts target/testapidocs/ AS LOCAL target/testapidocs/
53-
54-
# Test coverage and badge for Maven:
55-
# See above comments on enabling for Gradle.
56-
# Note that ONLY the Maven containerized build updates the README frontpage
57-
# badge for coverage. This is to avoid multiple updating.
58-
SAVE ARTIFACT --keep-ts target/site/jacoco/jacoco.csv AS LOCAL target/site/jacoco/jacoco.csv
32+
# For CI so that GitHub can copy artifacts:
33+
# Just copy everything rather than maintain a whitelist of files/dirs.
34+
SAVE ARTIFACT --keep-ts target AS LOCAL target
5935

6036
run-with-maven:
6137
FROM +build-with-maven

0 commit comments

Comments
 (0)