mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-12-27 19:07:28 +00:00
Jenkinsfile
Signed-off-by: wodnr533 <wodnr533@naver.com>
This commit is contained in:
parent
e4c4ff2176
commit
131d82a270
1 changed files with 4 additions and 21 deletions
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
|
|
@ -13,7 +13,7 @@ pipeline {
|
|||
stages{
|
||||
stage('Git Clone'){
|
||||
steps {
|
||||
git url: 'https://github.com/sjh4616/spring-petclinic.git', branch: 'main'
|
||||
git url: 'https://github.com/wodnr533/spring-petclinic.git'
|
||||
}
|
||||
}
|
||||
stage('Maven Build'){
|
||||
|
|
@ -44,27 +44,10 @@ pipeline {
|
|||
sh 'docker rmi wodnr8174/spring-petclinic:$BUILD_NUMBER wodnr8174/spring-petclinic:latest'
|
||||
}
|
||||
}
|
||||
stage('Publish Over SSH') {
|
||||
stage('Kubernetes Deploy') {
|
||||
steps {
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'WEB01',
|
||||
transfers: [sshTransfer(cleanRemote: false,
|
||||
excludes: '',
|
||||
execCommand: '''
|
||||
fuser -k 8080/tcp
|
||||
export BUILD_ID=WEB01
|
||||
nohup java -jar /home/web01/deploy/spring-petclinic-3.5.0-SNAPSHOT.jar >> nohup.out 2>&1 &''',
|
||||
execTimeout: 120000,
|
||||
flatten: false,
|
||||
makeEmptyDirs: false,
|
||||
noDefaultExcludes: false,
|
||||
patternSeparator: '[, ]+',
|
||||
remoteDirectory: '',
|
||||
remoteDirectorySDF: false,
|
||||
removePrefix: 'target',
|
||||
sourceFiles: 'target/*.jar')],
|
||||
usePromotionTimestamp: false,
|
||||
useWorkspaceInPromotion: false,
|
||||
verbose: false)])
|
||||
sh "kubectl set image deployment/petclinic workload=wodnr8174/spring-petclinic:latest"
|
||||
sh 'kubectl apply -f petclinic.yml'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue