This commit is contained in:
Lihan 2024-07-27 15:09:25 -04:00
parent 56c0156585
commit 3d02e1b15c
3 changed files with 4 additions and 2 deletions

3
.gitignore vendored
View file

@ -1,3 +1,4 @@
target/*
bin/* bin/*
build/* build/*
.gradle/* .gradle/*
@ -8,11 +9,11 @@ build/*
.attach_pid* .attach_pid*
.idea .idea
*.iml *.iml
/target
.sts4-cache/ .sts4-cache/
.vscode .vscode
_site/ _site/
*.css *.css
!petclinic.css !petclinic.css
zap-report/* zap-report/*
.DS_Store .DS_Store

View file

@ -15,7 +15,7 @@ COPY src ./src
RUN ./mvnw clean package -DskipTests RUN ./mvnw clean package -DskipTests
# Copy the JAR file to the app directory # 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 # Run the jar file
CMD ["java", "-jar", "app.jar"] CMD ["java", "-jar", "app.jar"]

1
Jenkinsfile vendored
View file

@ -25,6 +25,7 @@ pipeline {
echo "Docker Image built: ${dockerImage.id}" echo "Docker Image built: ${dockerImage.id}"
// Store the Docker image ID in the environment if needed across stages // Store the Docker image ID in the environment if needed across stages
env.DOCKER_IMAGE_ID = dockerImage.id env.DOCKER_IMAGE_ID = dockerImage.id
sh 'ls -la target/'
} }
} }
} }