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

Update Jenkinsfile

parent 3e3d0118
......@@ -9,19 +9,16 @@ pipeline {
}
}
stage('Build image') {
agent {
dockerfile {
label 'registry.lizhi.co/registry/mybbs'
}
agent any
}
steps {
echo 'Build image complete'
sh 'docker build -t registry.lizhi.co/registry/pybbs .'
sh 'docker push registry.lizhi.co/registry/pybbs .'
}
}
stage('deploy') {
agent any
steps {
sh 'docker push registry.lizhi.co/registry/pybbs .'
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