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

Update uat-phome.jenkinsfile

上级 79a6c9c1
#!groovy #!groovy
// User-defined Variables: // User-defined Variables:
def ip = "192.168.121.117"
// Git Repository // Git Repository
def repoUrl = "$git" def repoUrl = "$git"
...@@ -10,7 +12,7 @@ def repoUrl = "$git" ...@@ -10,7 +12,7 @@ def repoUrl = "$git"
// ------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------
// Public Variables // Public Variables
def CREDENTIALSID = "cd54b3b5-9773-4fac-8272-f783a4fc24ff" def CREDENTIALSID = "1fa6bf2e-e790-4262-8632-e119f8919bb9"
// Sonar // Sonar
def SONAR_HOST_URL = "http://192.168.140.201:9000" def SONAR_HOST_URL = "http://192.168.140.201:9000"
...@@ -101,17 +103,16 @@ pipeline{ ...@@ -101,17 +103,16 @@ pipeline{
// Update app // Update app
stage('deploy'){ stage('deploy'){
when { expression { envProfile ==~ /uat|test/ }} when { expression { envProfile ==~ /test|uat/ }}
steps{ steps{
sh label: '', script: ''' sh label: '', script: '''
ip="192.168.110.166" ip="192.168.110.166"
PROJECT=`echo $JOB_NAME | awk -F[\'_\'] \'{ print $3 }\'` PROJECT=`echo $JOB_NAME | awk -F[\'_\'] \'{ print $3 }\'`
rsync -av $WORKSPACE/dist/* root@$ip:/usr/share/nginx/html/$PROJECT/ rsync -av $WORKSPACE/dist/* root@$ip:/usr/share/nginx/html/$PROJECT/
''' '''
} }
} }
} }
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册