mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
Jenkinsfile_DB3
This commit is contained in:
parent
626f488a6d
commit
15ff9e999e
2 changed files with 9 additions and 9 deletions
13
Dockerfile
13
Dockerfile
|
@ -5,14 +5,15 @@ FROM eclipse-temurin:17-jdk-jammy
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy the compiled JAR file from the build stage
|
# Copy the compiled JAR file from the build stage
|
||||||
#COPY --from=build /home/azureuser/petclinic/target/*.jar /app/petclinic.jar
|
COPY /target/*.jar /app/petclinic.jar
|
||||||
COPY .mvn/ .mvn/
|
#COPY .mvn/ .mvn/
|
||||||
COPY mvnw pom.xml ./
|
#COPY mvnw pom.xml ./
|
||||||
#Run the dependecies on the image
|
#Run the dependecies on the image
|
||||||
RUN ./mvnw dependency:resolve
|
#RUN ./mvnw dependency:resolve
|
||||||
|
|
||||||
#COPY soruce code from local to the image
|
#COPY soruce code from local to the image
|
||||||
COPY src ./src
|
#COPY src ./src
|
||||||
|
|
||||||
# Specify the command to run on container start
|
# Specify the command to run on container start
|
||||||
CMD ["mvnw", "spring-boot:run"]
|
#CMD ["mvnw", "spring-boot:run"]
|
||||||
|
CMD ["java","-jar","/app/petclinic.jar"]
|
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
|
@ -22,9 +22,8 @@ pipeline {
|
||||||
stage ('Build a Docker Image') {
|
stage ('Build a Docker Image') {
|
||||||
steps {
|
steps {
|
||||||
// Build a Docker image
|
// Build a Docker image
|
||||||
script {
|
sh 'docker build -t petclinic:auto .'
|
||||||
def customImage = docker.build('petclinic:auto')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ('Archive test results') {
|
stage ('Archive test results') {
|
||||||
|
|
Loading…
Reference in a new issue