mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 15:25:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
73b262411b
commit
29cc2534e7
1 changed files with 42 additions and 5 deletions
47
Jenkinsfile
vendored
47
Jenkinsfile
vendored
|
@ -10,17 +10,54 @@ pipeline {
|
|||
steps {
|
||||
echo 'Git clone'
|
||||
git url: 'https://github.com/lwj9812/spring-petclinic.git',
|
||||
branch: 'efficient-webjars'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
branch: 'efficient-webjars'
|
||||
}
|
||||
post {
|
||||
success {
|
||||
echo 'Git Clone Success!!'
|
||||
}
|
||||
failure {
|
||||
echo 'Git Clone Fail'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Mvnen Build') {
|
||||
steps {
|
||||
echo 'Maven Build'
|
||||
sh 'mvn -Dmaven.test.failure.igmore=ture clean package '
|
||||
}
|
||||
post {
|
||||
success {
|
||||
junit 'target/surefire-reports/**/*.xml'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('SSH Publish') {
|
||||
steps {
|
||||
echo 'SSH publish'
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'target',
|
||||
transfers: [sshTransfer(cleanRemote: false,
|
||||
excludes: '',
|
||||
execCommand: '''
|
||||
fuser -k 8080/tcp
|
||||
export BUILD_ID=Pipeline-Test
|
||||
nohup java -jar /home/ubuntu/deploy/spring-petclinic-2.4.0.BUILD-SNAPSHOT.jar >> nohup.out 2>&1 &''',
|
||||
execTimeout: 120000,
|
||||
flatten: false,
|
||||
makeEmptyDirs: false,
|
||||
noDefaultExcludes: false,
|
||||
patternSeparator: '[, ]+',
|
||||
remoteDirectory: 'deploy',
|
||||
remoteDirectorySDF: false,
|
||||
removePrefix: 'target',
|
||||
sourceFiles: 'target/*.jar')],
|
||||
usePromotionTimestamp: false,
|
||||
useWorkspaceInPromotion: false, verbose: false)])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue