feat(analytics): add Dockerfile, CI workflow, and stable jar name for K8s deployment
- Pin jar output to analytics.jar (no version suffix) so Dockerfile COPY is stable - Add Dockerfile based on apache/spark:3.5.4-scala2.13-java17-ubuntu - Add versions.env (0.1.0) matching GitOps overlay image tag - Add analytics-image.yml CI workflow following native-image.yml conventions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -79,7 +79,11 @@ application {
|
||||
|
||||
// Fat jar: includes runtimeClasspath (our code + pg driver + scala3-library)
|
||||
// but NOT compileOnly Spark jars.
|
||||
// archiveVersion is cleared so the output is always "analytics.jar" — stable
|
||||
// name required by the Dockerfile COPY instruction.
|
||||
tasks.jar {
|
||||
archiveBaseName.set("analytics")
|
||||
archiveVersion.set("")
|
||||
manifest {
|
||||
attributes["Main-Class"] = "de.nowchess.analytics.OpeningBookJob"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
FROM apache/spark:3.5.4-scala2.13-java17-ubuntu
|
||||
|
||||
USER root
|
||||
|
||||
# analytics.jar = fat jar containing app code + PostgreSQL JDBC driver + Scala 3 runtime.
|
||||
# Spark itself is provided by the base image at /opt/spark — it is NOT included in the jar.
|
||||
COPY build/libs/analytics.jar /app/analytics.jar
|
||||
|
||||
USER spark
|
||||
@@ -0,0 +1,3 @@
|
||||
MAJOR=0
|
||||
MINOR=1
|
||||
PATCH=0
|
||||
Reference in New Issue
Block a user