1 Star 0 Fork 3.7K

愚公爱吃虾/O2OA

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jenkinsBuildfile 2.71 KB
一键复制 编辑 原始数据 按行查看 历史
汤汤 提交于 2020-04-16 16:24 . Update jenkinsBuildfile
pipeline {
agent {label 'master' }
stages {
stage('getEnv') {
steps {
echo 'env.sshServer='+env.sshServer
echo 'env.preName='+env.preName
echo 'env.isallTag='+env.isallTag
echo 'env.qqGroupid='+env.qqGroupid
echo 'env.qqUrl='+env.qqUrl
bat "cd.> \"gitTag.txt\""
bat "git describe --tags >>\"gitTag.txt\""
script {
json_file = "gitTag.txt"
file_contents = readFile json_file
if(file_contents.trim().indexOf("-")!=-1&&env.isallTag.trim().indexOf("true")==-1){
env.tag =file_contents.trim().substring(0,file_contents.trim().indexOf("-"))
}else{
env.tag =file_contents.trim();
}
}
echo 'env.tag='+env.tag
}
}
stage('initAndBuildAndSendzip') {
steps {
script {
env.buildResult='FAILURE'
}
catchError(buildResult: 'SUCCESS'){
bat 'npm install'
bat 'npm run build_ci'
bat 'ant -DVERSION='+env.tag+' -DpreName='+env.preName
sshPublisher(publishers: [sshPublisherDesc(configName: ''+env.sshServer+'', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/o2server/servers/webServer/download', remoteDirectorySDF: false, removePrefix: '', sourceFiles: ''+env.preName+'-'+env.tag+'*.zip')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
sshPublisher(publishers: [sshPublisherDesc(configName: ''+env.sshServer+'', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/o2server/servers/webServer/download', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'download-pro.json,download_preview.jsonp')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
script {
env.buildResult='SUCCESS'
}
}
}
}
stage('messageNotice') {
steps{
script {
env.messageNotice="%e5%ae%8c%e6%88%90ssh%e6%9c%8d%e5%8a%a1%e5%99%a8%3d"+env.sshServer+",%e5%89%8d%e7%bc%80%3d"+env.preName+",tag%e7%89%88%e6%9c%ac%3d"+env.tag+"%e7%9a%84%e7%89%88%e6%9c%ac%e6%89%93%e5%8c%85%ef%bc%8c%e8%af%b7%e6%a0%b8%e5%ae%9e"+env.buildResult
}
echo 'env.messageNotice='+env.messageNotice
httpRequest responseHandle: 'NONE', url: env.qqUrl+'/send_group_msg?group_id='+env.qqGroupid+'&message='+env.messageNotice, wrapAsMultipart: false
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yugongantony/O2OA.git
git@gitee.com:yugongantony/O2OA.git
yugongantony
O2OA
O2OA
develop

搜索帮助

0d507c66 1850385 C8b1a773 1850385