1 Star 0 Fork 3

lxtong/TestPlatformByYangLiang

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Jenkinsfile 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
pipeline {
agent any
stages {
stage('Clean Server') {
steps {
sshPublisher(publishers: [sshPublisherDesc(configName: 'server', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''docker stop tpbylsrv
docker rm tpbylsrv
docker rmi tpbylsrv
rm -rf python_docker''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '', remoteDirectorySDF: false, removePrefix: '', sourceFiles: '')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
echo 'Successful'
}
}
stage('Send service package') {
steps {
sshPublisher(publishers: [sshPublisherDesc(configName: 'server', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/python_docker', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'Dockerfile'), sshTransfer(cleanRemote: false, excludes: '', execCommand: '''cd python_docker/
docker build -t tpbylsrv .
docker run -d -p 1651:1650 -v /root/python_item/log/:/log/ --name tpbylsrv tpbylsrv''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/python_docker', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'requirements.txt')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
echo 'Successful'
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/wftong/TestPlatformByYangLiang.git
git@gitee.com:wftong/TestPlatformByYangLiang.git
wftong
TestPlatformByYangLiang
TestPlatformByYangLiang
master

搜索帮助