File tree 2 files changed +7
-9
lines changed
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1
1
# === Build maven cache ===
2
2
3
- FROM maven:3.8.3-jdk-11 AS cache
3
+ FROM maven:3.9.9-eclipse-temurin-21 AS cache
4
4
5
5
# Ensure exercise dependencies are downloaded
6
6
WORKDIR /opt/exercise
@@ -10,14 +10,12 @@ RUN mvn test dependency:go-offline -DexcludeReactor=false
10
10
11
11
# === Build runtime image ===
12
12
13
- FROM maven:3.8.3-jdk-11-slim
13
+ FROM maven:3.9.9-eclipse-temurin-21-alpine
14
14
WORKDIR /opt/test-runner
15
15
16
- RUN apt-get update && \
17
- apt-get install -y jq && \
18
- apt-get purge --auto-remove -y && \
19
- apt-get clean && \
20
- rm -rf /var/lib/apt/lists/*
16
+ RUN apk update && \
17
+ apk add --no-cache --upgrade jq sed grep && \
18
+ rm -rf /var/cache/apk/*
21
19
22
20
# Copy resources
23
21
COPY . .
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export JAVA_TOOL_OPTIONS="-Djansi.tmpdir=/solution/jansi-tmp -Xss128m -Xms256m -
70
70
rm -rf target
71
71
# Run the tests for the provided implementation file and redirect stdout and
72
72
# stderr to capture it
73
- test_output=$( mvn --offline --legacy-local-repository -- batch-mode --non-recursive --quiet test 2>&1 )
73
+ test_output=$( mvn --offline --batch-mode --non-recursive --quiet test 2>&1 )
74
74
exit_code=$?
75
75
76
76
rm -f pom.xml
103
103
104
104
# Manually add colors to the output to help scanning the output for errors
105
105
colorized_test_output=$( echo " ${sanitized_output} " | \
106
- GREP_COLOR= ' 01;31' grep --color=always -E -e ' ^\[ERROR\].+$|$' )
106
+ GREP_COLORS= ' mt= 01;31' grep --color=always -E -e ' ^\[ERROR\].+$|$' )
107
107
108
108
jq -n --arg output " ${colorized_test_output} " ' {version: 1, status: "fail", message: $output}' > ${results_file}
109
109
fi
You can’t perform that action at this time.
0 commit comments