1 Star 0 Fork 0

keyon/jenkins-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
jenkinsfile_cds 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
kezhangjie 提交于 2024-11-02 13:02 . 添加jenkinsfile文件
def remote_72 = [:]
remote_72.name = '72'
remote_72.host = '10.40.0.72'
remote_72.user = 'root'
remote_72.password = 'KHMedtw@2858'
remote_72.allowAnyHosts = true
def remote_84 = [:]
remote_84.name = '84'
remote_84.host = '10.40.0.84'
remote_84.user = 'root'
remote_84.password = 'MHGfxgh!9734'
remote_84.allowAnyHosts = true
pipeline {
agent any
stages {
stage('check out') {
steps {
git branch: "master", credentialsId: 'a42cdcc7-4a9f-4141-b844-d88ecd6a2b57', url: 'http://10.32.0.24:8099/srm/cds/${moduleName}.git'
}
}
stage('deploy') {
steps {
sh 'rm -rf ${moduleName}-custom/static'
// sshRemove remote: remote_72, path: "${cds_home}/workspace/generate/module/${moduleName}/${moduleName}-custom"
sshPut remote: remote_84, from: "${moduleName}-custom", into: "${cds_home}/workspace/generate/module/${moduleName}"
}
}
// stage('restart') {
// steps {
// sshCommand remote: remote_84, command: "kubectl get pod `kubectl get pods -o=name | grep ${appCode} | cut -d'/' -f2` -n dt -o yaml | kubectl replace --force -f -"
// }
// }
}
post {
always {
cleanWs()
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kzj9537/jenkins-demo.git
git@gitee.com:kzj9537/jenkins-demo.git
kzj9537
jenkins-demo
jenkins-demo
master

搜索帮助