Add gitea-actions: Spring Boot 4.2.0 CI with surefire/failsafe, Testcontainers, CycloneDX SBOM and Jib

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b69H5rTewUKPyhGS8r
This commit is contained in:
2026-12-01 23:59:28 +05:30
co-authored by Claude Sonnet 5.5
parent bb12eaca0a
commit 5facfdc212
30 changed files with 811 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# The command the pipeline runs, and what it produces. Then the same command with no Docker.
source "$(dirname "$0")/lib.sh"
{
banner "mvn -B -ntp verify (key lines)"
"${MVN[@]}" clean verify 2>&1 | clean | grep -E '^\[INFO\] --- |Tests run:|BUILD|cyclonedx.*attaching|Replacing main' | sed -E 's/ @ gitea-actions-demo//; s/ in com.ankurm.ci.*/ in <class>/; s/, Time elapsed: [0-9.]+ s//'
banner "target/ after the build"
ls target | grep -E '\.(jar|original)$' | sort
# Why the socket is masked instead of just setting DOCKER_HOST to a bad value: Testcontainers tries the
# DOCKER_HOST strategy first and then falls back to the default /var/run/docker.sock. A first draft of
# this script only set DOCKER_HOST=unix:///nonexistent.sock and the build still passed.
banner "Same command where Docker is really unreachable (docker.sock masked in a private mount namespace)"
unshare -m bash -c 'mount --bind /dev/null /var/run/docker.sock && DOCKER_HOST=unix:///var/run/docker.sock mvn -B -ntp verify' 2>&1 | clean \
| grep -E 'Tests run:|Could not find a valid Docker|BUILD|ERROR\] +(TicketApiIT|Tests run)' | sed -E 's/, Time elapsed: [0-9.]+ s//; s/ in com.ankurm.ci.*/ in <class>/' | cut -c1-200 | awk '!seen[$0]++'
} 2>&1 | tee "$OUT/03-build-test.txt"