mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
Jenkinsfile_DB4
This commit is contained in:
parent
15ff9e999e
commit
5fc631d8af
2 changed files with 6 additions and 25 deletions
19
Dockerfile
19
Dockerfile
|
@ -1,19 +0,0 @@
|
||||||
# Use an official OpenJDK runtime as a parent image
|
|
||||||
FROM eclipse-temurin:17-jdk-jammy
|
|
||||||
|
|
||||||
# Set the working directory in the container
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copy the compiled JAR file from the build stage
|
|
||||||
COPY /target/*.jar /app/petclinic.jar
|
|
||||||
#COPY .mvn/ .mvn/
|
|
||||||
#COPY mvnw pom.xml ./
|
|
||||||
#Run the dependecies on the image
|
|
||||||
#RUN ./mvnw dependency:resolve
|
|
||||||
|
|
||||||
#COPY soruce code from local to the image
|
|
||||||
#COPY src ./src
|
|
||||||
|
|
||||||
# Specify the command to run on container start
|
|
||||||
#CMD ["mvnw", "spring-boot:run"]
|
|
||||||
CMD ["java","-jar","/app/petclinic.jar"]
|
|
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
|
@ -19,13 +19,13 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
stage ('Build a Docker Image') {
|
// stage ('Build a Docker Image') {
|
||||||
steps {
|
// steps {
|
||||||
// Build a Docker image
|
// // Build a Docker image
|
||||||
sh 'docker build -t petclinic:auto .'
|
// sh 'docker build -t petclinic:auto .'
|
||||||
|
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
stage ('Archive test results') {
|
stage ('Archive test results') {
|
||||||
steps {
|
steps {
|
||||||
//Archive the test results
|
//Archive the test results
|
||||||
|
|
Loading…
Reference in a new issue