This commit is contained in:
peddiraju 2022-12-26 15:31:27 +05:30
parent 0f411e5360
commit b93bd51f52
2 changed files with 14 additions and 21 deletions

View file

@ -2,6 +2,6 @@ FROM amazoncorretto:11
LABEL Version="1.0"
LABEL Authour="raakhi"
LABEL Description="This-is-for-practice"
ADD https://github.com/peddiraju3122b/spring-petclinic.git /home/ubuntu/spring-petclinic
ADD https://github.com/peddiraju3122b/spring-petclinic.git /home/ubuntu/spring-petclinic/Dockerfile
EXPOSE 8080
CMD ["java","-jar","/spring-petclinic-2.4.2.jar"]

View file

@ -1,25 +1,18 @@
pipeline
{
agent
{
label 'ubuntu-node'
}
stages
{
stage ('git clone')
{
steps
{
git url:'https://github.com/peddiraju3122b/spring-petclinic.git'
pipeline{
agent{ label 'node4'}
stages{
stage('clone'){
steps{
git url: 'https://github.com/peddiraju3122b/spring-petclinic.git',
branch: 'main'
}
}
stage ('mvn package')
{
steps
{
sh 'mvn package'
stage('image'){
steps{
sh """
docker image build -t spc:1.0 .
docker image tag spc:1.0 peddiraju3122b/spc:1.0
docker image push peddiraju3122b/spc:1.0 ""
}
}
}