提交 62f4a09d 编写于 作者: L liuyq-617

fix jenkinsfile error

上级 0f1d6ee6
...@@ -40,14 +40,15 @@ def pre_test(){ ...@@ -40,14 +40,15 @@ def pre_test(){
sh ''' sh '''
cd ${WKC} cd ${WKC}
rm -rf * git checkout develop
git pull
git fetch
git checkout ${CHANGE_BRANCH}
git merge develop
cd ${WK} cd ${WK}
git reset --hard git reset --hard
git checkout develop git checkout develop
git pull git pull
cd ${WKC}
rm -rf *
mv ${WORKSPACE}/* .
cd ${WK} cd ${WK}
export TZ=Asia/Harbin export TZ=Asia/Harbin
date date
......
...@@ -7,12 +7,12 @@ def pre_test(){ ...@@ -7,12 +7,12 @@ def pre_test(){
sh ''' sh '''
cd ${WKC} cd ${WKC}
git reset --hard git reset --hard
git checkout ${BRANCH} git checkout $BRANCH_NAME
git pull git pull
git submodule update git submodule update
cd ${WK} cd ${WK}
git reset --hard git reset --hard
git checkout ${BRANCH} git checkout $BRANCH_NAME
git pull git pull
export TZ=Asia/Harbin export TZ=Asia/Harbin
date date
...@@ -28,7 +28,7 @@ def pre_test(){ ...@@ -28,7 +28,7 @@ def pre_test(){
pipeline { pipeline {
agent none agent none
environment{ environment{
BRANCH = $branch_name
WK = '/var/lib/jenkins/workspace/TDinternal' WK = '/var/lib/jenkins/workspace/TDinternal'
WKC= '/var/lib/jenkins/workspace/TDinternal/community' WKC= '/var/lib/jenkins/workspace/TDinternal/community'
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册