提交 f37acddb 编写于 作者: zhangsiyuan's avatar zhangsiyuan

Update pro-phome.jenkinsfile

上级 4fd90d07
// User-defined Variables:
def ip1 = "106.15.93.220"
def ip2 = "101.132.177.152"
// Git Repository
def repoUrl = "$git"
......@@ -105,10 +102,14 @@ pipeline{
stage('deploy'){
when { expression { envProfile ==~ /prod|uat/ }}
steps{
sh label: '', script: """
rsync -av $WORKSPACE/dist/* root@$ip1:/usr/share/nginx/html/phome/$JOB_NAME/
rsync -av $WORKSPACE/dist/* root@$ip2:/usr/share/nginx/html/phome/$JOB_NAME/
"""
sh label: '', script: '''
ip="47.100.247.24"
nginx_path="/usr/share/nginx/html"
PROJECT=`echo $JOB_NAME | awk -F[\'_\'] \'{ print $3 }\'`
ssh root@$ip "sh /usr/local/sbin/fe_bak.sh $nginx_path $PROJECT ${BUILD_TIMESTAMP}"
rsync -av $WORKSPACE/dist/* root@$ip:/usr/share/nginx/html/$PROJECT/
'''
}
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册