mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-10 03:51:11 +00:00
Update Jenkinsfile
Signed-off-by: wodnr533 <wodnr533@naver.com>
This commit is contained in:
parent
3d5d5f04f4
commit
ca0a560a73
1 changed files with 30 additions and 3 deletions
33
Jenkinsfile
vendored
33
Jenkinsfile
vendored
|
|
@ -5,17 +5,44 @@ pipeline {
|
|||
maven "M3"
|
||||
jdk "JDK17"
|
||||
}
|
||||
|
||||
|
||||
stages{
|
||||
stage('Git Clone'){
|
||||
steps {
|
||||
git url: 'https://github.com/wodnr533/spring-petclinic.git', branch: 'main'
|
||||
git url: 'https://github.com/sjh4616/spring-petclinic.git', branch: 'main'
|
||||
}
|
||||
}
|
||||
stage('Maven Build'){
|
||||
steps {
|
||||
sh 'mvn -Dmaven.test.failure.ignore=true clean package'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Publish over SSH') {
|
||||
steps {
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'target',
|
||||
transfers: [sshTransfer(cleanRemote: false,
|
||||
excludes: '',
|
||||
execCommand: '''
|
||||
fuser -k 8080/tcp
|
||||
export BUILD_ID=Pipeline-PetClinic
|
||||
nohup java -jar /home/ubuntu/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)])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue