added chnages

This commit is contained in:
lahari104 2023-02-17 18:10:50 +05:30
parent 55841d2b63
commit 6128453e3a
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,10 @@
FROM ubuntu:20.04 as build
RUN apt update && \
apt install openjdk-17-jdk -y && \
apt install maven -y && \
apt install git -y && \
git clone https://github.com/spring-projects/spring-petclinic.git && \
cd spring-petclinic && \
./mvnw package
EXPOSE 8080
CMD [ "java", "-jar", "/spring-petclinic/target/spring-petclinic-3.0.0-SNAPSHOT.jar" ]

22
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,22 @@
pipeline{
agent{
label 'docker'
}
triggers{
pollSCM('* * * * *')
}
parameters{
choice(name: 'branch_name', choices: ['main', 'two', 'three'], description: 'selecting branch')
}
environment{
dockerhub_registry_name = "lahari104"
image_name = "spc"
}
stages{
stage('docker image build'){
steps{
sh 'docker image build -t spc:1.0 .'
}
}
}
}