mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-26 01:15:50 +00:00
added chnages
This commit is contained in:
parent
55841d2b63
commit
6128453e3a
2 changed files with 32 additions and 0 deletions
10
Dockerfile
10
Dockerfile
|
@ -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
22
Jenkinsfile
vendored
Normal 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 .'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue