mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 08:15:49 +00:00
added doker
This commit is contained in:
parent
970f81c6dc
commit
e2e775f984
1 changed files with 33 additions and 4 deletions
33
Jenkinsfile
vendored
33
Jenkinsfile
vendored
|
@ -30,7 +30,7 @@ pipeline{
|
||||||
|
|
||||||
stage('nexus'){
|
stage('nexus'){
|
||||||
steps{
|
steps{
|
||||||
nexusArtifactUploader artifacts: [[artifactId: 'spring-petclinic', classifier: '', file: '/home/ubuntu/workspace/spc-nexus/target/spring-petclinic-3.1.0-SNAPSHOT.jar', type: 'jar']], credentialsId: 'nexus', groupId: 'org.springframework.samples', nexusUrl: '100.25.204.191:8081', nexusVersion: 'nexus3', protocol: 'http', repository: 'maven-snapshots', version: '3.1.0-SNAPSHOT'
|
nexusArtifactUploader artifacts: [[artifactId: 'spring-petclinic', classifier: '', file: '/home/ubuntu/workspace/spc-nexus/target/spring-petclinic-3.1.0-SNAPSHOT.jar', type: 'jar']], credentialsId: 'nexus', groupId: 'org.springframework.samples', nexusUrl: '100.24.206.104:8081', nexusVersion: 'nexus3', protocol: 'http', repository: 'maven-snapshots', version: '3.1.0-SNAPSHOT'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,9 +42,38 @@ pipeline{
|
||||||
junit testResults: '**/surefire-reports/TEST-*.xml'
|
junit testResults: '**/surefire-reports/TEST-*.xml'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('artifact build'){
|
||||||
|
steps{
|
||||||
|
sh 'docker image build -t spc-mvn .'
|
||||||
|
sh 'docker image list'
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
stage('docker login'){
|
||||||
|
steps{
|
||||||
|
withCredentials([string(credentialsId: 'DOCKER_HUB_PASSWORD',variable: 'PASSWORD')]) {
|
||||||
|
sh 'docker login -u sridhar006 -p $PASSWORD'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('docker push image '){
|
||||||
|
steps{
|
||||||
|
sh 'docker image tag spc-mvn sridhar006/spc-mvn:${BUILD_ID}'
|
||||||
|
sh 'docker push sridhar006/spc-mvn:${BUILD_ID}'
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// stage("kubernetes deployment"){
|
||||||
|
// steps{
|
||||||
|
// sh 'kubectl apply -f deployement.yaml'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue