Commit 4ac5c351 authored by Josh Steinberg's avatar Josh Steinberg

added dockerfile

parent 2fc3fd46
FROM maven:3.6.0-jdk-11-slim AS TEMP_BUILD_IMAGE
# RUN gradle build || return 0
COPY src /home/app/src
COPY pom.xml /home/app
RUN mvn -f /home/app/pom.xml clean package
# actual container
FROM openjdk:11-jre-slim
COPY --from=TEMP_BUILD_IMAGE /home/app/target/spring-boot-complete-0.0.1-SNAPSHOT.jar /usr/local/lib/hello-world.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/usr/local/lib/hello-world.jar"]
\ No newline at end of file
......@@ -73,5 +73,20 @@ pipeline {
}
}
}
stage('Build App and Make Image') {
steps {
echo 'Building App, Making Image and Pushing Image'
container(name: 'kaniko', shell: '/busybox/sh') {
dir("inventory-backend"){
sh "pwd"
sh "ls"
sh '''#!/busybox/sh
/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=nexus.mynisum.com:2376/ascend-kafka/ascend2-inventory-backend:latest
'''
}
}
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment