Update Jenkinsfile

Signed-off-by: wodnr533 <wodnr533@naver.com>
This commit is contained in:
wodnr533 2025-09-03 09:07:52 +09:00 committed by GitHub
parent 3d5d5f04f4
commit ca0a560a73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

33
Jenkinsfile vendored
View file

@ -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)])
}
}
}
}