Create Jenkinsfile2

Added jenkins file
This commit is contained in:
SHAIK.SOHAIL 2023-03-15 14:21:38 +05:30 committed by GitHub
parent 13b62e205b
commit ea9b91a246
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

23
Jenkinsfile2 Normal file
View file

@ -0,0 +1,23 @@
pipeline {
agent{label 'node'}
triggers{
pollSCM('* * * * *')
}
stages{
stage('vcs') {
steps{
git url: 'https://github.com/shaiksohail11/spring-petclinic.git',
branch: 'main'
}
}
stage('Build') {
steps{
sh 'docker image build -t shaik1128/spring-petclinic:3.0 .',
sh 'docker push shaik1128/spring-petclinic:3.0'
}
}
}
}