From 3d02e1b15c791d1783baa2e5262d92b16c6d8101 Mon Sep 17 00:00:00 2001 From: Lihan Date: Sat, 27 Jul 2024 15:09:25 -0400 Subject: [PATCH] 1 --- .gitignore | 3 ++- Dockerfile | 2 +- Jenkinsfile | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 87ed660b9..32295ffc8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +target/* bin/* build/* .gradle/* @@ -8,11 +9,11 @@ build/* .attach_pid* .idea *.iml +/target .sts4-cache/ .vscode _site/ *.css !petclinic.css - zap-report/* .DS_Store diff --git a/Dockerfile b/Dockerfile index 1fc670953..2dbfce412 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ COPY src ./src RUN ./mvnw clean package -DskipTests # Copy the JAR file to the app directory -COPY /app/target/spring-petclinic-3.3.0-SNAPSHOT.jar app.jar +COPY target/*.jar app.jar # Run the jar file CMD ["java", "-jar", "app.jar"] diff --git a/Jenkinsfile b/Jenkinsfile index 8ac23c6f0..31609f16c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,6 +25,7 @@ pipeline { echo "Docker Image built: ${dockerImage.id}" // Store the Docker image ID in the environment if needed across stages env.DOCKER_IMAGE_ID = dockerImage.id + sh 'ls -la target/' } } }