mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55:50 +00:00
test
This commit is contained in:
parent
a60b181eb9
commit
19dbd094ec
2 changed files with 2 additions and 5 deletions
|
@ -14,11 +14,8 @@ COPY src ./src
|
||||||
# Package the application
|
# Package the application
|
||||||
RUN ./mvnw clean package -Dmaven.test.skip=true
|
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 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
|
# Run the jar file
|
||||||
CMD ["java", "-jar", "app.jar"]
|
CMD ["java", "-jar", "app.jar"]
|
||||||
|
|
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
|
@ -21,7 +21,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Building Docker Image..."
|
echo "Building Docker Image..."
|
||||||
def dockerImage = docker.build("spring-petclinic")
|
def dockerImage = docker.build("spring-petclinic", "--no-cache .")
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue