代码拉取完成,页面将自动刷新
#!groovy
pipeline{
agent any
environment {
job_display_name_zh="测试环境/plat51/一键部署"
}
stages{
stage('拉取代码') {
steps {
timestamps{
script{
try{
def exe_script='export LC_CTYPE=zh_CN.UTF-8;cd ${HOME}/deploy/plat51/;git pull origin develop';
sh 'ooxx plat51 plat51 127.0.0.1 ' +'\''+exe_script+'\''
} catch(any) {
currentBuild.result = 'FAILURE'
sh 'echo "拉取代码" > $WORKSPACE/c_build_stage${BUILD_NUMBER}'
throw any
}
}
}
}
}
stage('编译部署') {
steps {
timestamps{
script{
try{
def exe_script='export LC_CTYPE=zh_CN.UTF-8;. /etc/profile;cd ${HOME}/deploy/linkusWeb;ant -f build.xml deploy;';
sh 'ooxx plat51 plat51 127.0.0.1 ' +'\''+exe_script+'\''
} catch(any) {
currentBuild.result = 'FAILURE'
sh 'echo "编译部署" > $WORKSPACE/c_build_stage${BUILD_NUMBER}'
throw any
}
}
}
}
}
stage('重启服务') {
steps {
timestamps{
script{
try{
sh 'ooxx plat51 plat51 127.0.0.1 \'. .bash_profile;sh ${HOME}/tbin/jtrestart.sh\''
} catch(any) {
currentBuild.result = 'FAILURE'
sh 'echo "重启服务" > $WORKSPACE/c_build_stage${BUILD_NUMBER}'
throw any
}
}
}
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。