From 19dbd094ecad0b33b748fdbc2a27bba192df81e6 Mon Sep 17 00:00:00 2001 From: Lihan Date: Sat, 27 Jul 2024 21:57:08 -0400 Subject: [PATCH] test --- Dockerfile | 5 +---- Jenkinsfile | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 71ebac026..6a6ac343a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,11 +14,8 @@ COPY src ./src # Package the application RUN ./mvnw clean package -Dmaven.test.skip=true -# Verify the build output -RUN ls -alh /app/target/ - # Copy the JAR file to the app directory -COPY /app/target/spring-petclinic-3.3.0-SNAPSHOT.jar.original app.jar +COPY target/*.jar app.jar # Run the jar file CMD ["java", "-jar", "app.jar"] diff --git a/Jenkinsfile b/Jenkinsfile index bd0ff8d89..5198b7d29 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { steps { script { echo "Building Docker Image..." - def dockerImage = docker.build("spring-petclinic") + def dockerImage = docker.build("spring-petclinic", "--no-cache .") echo "Docker Image built: ${dockerImage.id}" // Store the Docker image ID in the environment if needed across stages env.DOCKER_IMAGE_ID = dockerImage.id