暂存提交

This commit is contained in:
2026-07-30 22:43:48 +08:00
parent 86547fc053
commit 6928149884
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -1,4 +1,5 @@
target/
.docker-context/
*.log
.idea/
*.iml
Vendored
+3 -1
View File
@@ -161,7 +161,9 @@ pipeline {
script {
env.SELECTED_SERVICES.split(',').each { service ->
String image = "${env.RESOLVED_IMAGE_REPOSITORY}/${service}:${env.IMAGE_TAG}"
sh "docker build -f deploy/docker/Dockerfile --build-arg BASE_IMAGE=${params.DOCKER_BASE_IMAGE} --build-arg JAR_FILE=${serviceJars[service]} -t ${image} ."
String contextDir = ".docker-context/${service}"
sh "mkdir -p '${contextDir}' && cp -f '${serviceJars[service]}' '${contextDir}/app.jar'"
sh "docker build -f deploy/docker/Dockerfile --build-arg BASE_IMAGE=${params.DOCKER_BASE_IMAGE} --build-arg JAR_FILE=app.jar -t ${image} '${contextDir}'"
}
if (params.ENVIRONMENT == 'test') {