Commit 4052bcb1 authored by 郭灿峰's avatar 郭灿峰

Update Jenkinsfile

parent eab1f188
pipeline {
agent none
agent any
stages {
stage('Build') {
agent any
}
steps {
sh 'mvn clean package'
}
}
stage('Build image') {
agent any
}
steps {
sh 'docker build -t registry.lizhi.co/registry/pybbs .'
sh 'docker push registry.lizhi.co/registry/pybbs .'
}
}
stage('deploy') {
agent any
steps {
steps {
sshPublisher(publishers: [sshPublisherDesc(configName: 'nginx', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '~/docker-compose down && ~/docker-compose up -d', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '~/docker-compose.yml', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'docker-compose.yml')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment