fix jenkinsfile error

This commit is contained in:
liuyq-617 2020-12-21 15:52:20 +08:00
parent 0f1d6ee6c1
commit 62f4a09d5d
2 changed files with 8 additions and 7 deletions

9
Jenkinsfile vendored
View File

@ -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

6
tests/Jenkinsfile vendored
View File

@ -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(){
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'
} }