This commit is contained in:
Maharshi Patel 2021-01-10 17:40:59 -08:00
parent 80e9ecfe18
commit 043fa2d326
2 changed files with 10 additions and 10 deletions

View file

@ -10,7 +10,7 @@ RUN mvn package
FROM openjdk:8-jre-alpine FROM openjdk:8-jre-alpine
WORKDIR /app WORKDIR /app
RUN echo "$ENV_VAR" RUN echo "$build_id"
COPY --from=build-env /app/target/spring-petclinic-2.4.0.BUILD-SNAPSHOT.jar ./spring-petclinic.jar COPY --from=build-env /app/target/spring-petclinic-2.4.0.BUILD-SNAPSHOT.jar ./spring-petclinic.jar
COPY --from=build-env /app/target/spring-petclinic-2.4.0.BUILD-SNAPSHOT.jar ./spring-petclinic-2.4.0.BUILD-${env.BUILD_ID}.jar COPY --from=build-env /app/target/spring-petclinic-2.4.0.BUILD-SNAPSHOT.jar ./spring-petclinic-2.4.0.BUILD-${env.BUILD_ID}.jar
RUN apk update && apk --no-cache add curl RUN apk update && apk --no-cache add curl

18
Jenkinsfile vendored
View file

@ -25,7 +25,7 @@ pipeline {
stages { stages {
stage('build started') { stage('build started') {
steps { steps {
echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL}" echo "//////////////// build <<< ${env.BUILD_ID} >>> started ////////////////////"
} }
} }
stage('build maven package') { stage('build maven package') {
@ -53,14 +53,14 @@ pipeline {
} }
stage ('print job summary') { stage ('print job summary') {
steps { steps {
println "----Git repo link: https://github.com/mnpatel0611/spring-petclinic" echo "----Git repo link: https://github.com/mnpatel0611/spring-petclinic"
println "------------------------------------------------" echo "------------------------------------------------"
println "--------------------INFO------------------------" echo "--------------------INFO------------------------"
println "Docker image pushed to Dockerhub: mpatel011/spring-petclinic:$BUILD_NUMBER" echo "Docker image pushed to Dockerhub: mpatel011/spring-petclinic:$BUILD_NUMBER"
println "artifactory_url: $artifactory_url" echo "artifactory_url: $artifactory_url"
println "artifactory_repo: $artifactory_repo" echo "artifactory_repo: $artifactory_repo"
println "------------------------------------------------" echo "------------------------------------------------"
println "------------------------------------------------" echo "------------------------------------------------"
} }
} }
} }