Commit ceb96484 authored by 郭灿峰's avatar 郭灿峰

Update Jenkinsfile

parent 3145b310
pipeline { pipeline {
agent any agent any
stages { stages {
stage('Build') {
steps {
sh '/var/jenkins_home/plugins/apache-maven-3.6.3/bin/mvn clean package'
}
}
stage('Build image') {
steps {
sh 'docker build -t registry.lizhi.co/registry/pybbs .'
sh 'docker push registry.lizhi.co/registry/pybbs'
}
}
stage('deploy') { stage('deploy') {
steps { steps {
sshPublisher(publishers: [sshPublisherDesc(configName: 'nginx', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '/usr/bin/cd /app && /usr/local/bin/docker-compose down && /usr/local/bin/docker-compose up -d', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '', remoteDirectorySDF: false, removePrefix: '/maven_test/target', sourceFiles: '**/maven_test/target/*jar')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) sshPublisher(publishers: [sshPublisherDesc(configName: 'nginx', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '/usr/bin/cd /app && /usr/local/bin/docker-compose down && /usr/local/bin/docker-compose up -d', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '', remoteDirectorySDF: false, removePrefix: '/maven_test/target', sourceFiles: '**/maven_test/target/*jar')], 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