mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-12 04:51:11 +00:00
Update Jenkinsfile
Signed-off-by: wodnr533 <wodnr533@naver.com>
This commit is contained in:
parent
ca0a560a73
commit
027b15ff2a
1 changed files with 5 additions and 20 deletions
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
|
|
@ -17,27 +17,12 @@ pipeline {
|
|||
sh 'mvn -Dmaven.test.failure.ignore=true clean package'
|
||||
}
|
||||
}
|
||||
stage('Publish over SSH') {
|
||||
stage('Docker Image Create') {
|
||||
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)])
|
||||
sh """
|
||||
docker build -t wodnr8174/spring-petclinic:$BUILD_NUMBER .
|
||||
docker tag wodnr8174/spring-petclinic:$BUILD_NUMBER wodnr8174/spring-petclinic:latest
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue