未验证 提交 8e88aab4 编写于 作者: H huili 提交者: GitHub

Merge pull request #5702 from taosdata/test/testcase

 fix changing target branch
...@@ -42,8 +42,24 @@ def pre_test(){ ...@@ -42,8 +42,24 @@ def pre_test(){
killall -9 taosd ||echo "no taosd running" killall -9 taosd ||echo "no taosd running"
killall -9 gdb || echo "no gdb running" killall -9 gdb || echo "no gdb running"
cd ${WKC} cd ${WKC}
git reset --hard HEAD~10 >/dev/null git reset --hard HEAD~10 >/dev/null
git checkout develop '''
script {
if (env.CHANGE_TARGET == 'master') {
sh '''
cd ${WKC}
git checkout master
'''
}
else {
sh '''
cd ${WKC}
git checkout develop
'''
}
}
sh'''
cd ${WKC}
git pull >/dev/null git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD git checkout -qf FETCH_HEAD
...@@ -53,15 +69,22 @@ def pre_test(){ ...@@ -53,15 +69,22 @@ def pre_test(){
''' '''
script { script {
if (env.CHANGE_TARGET == 'master') { if (env.CHANGE_TARGET == 'master') {
sh 'git checkout master' sh '''
cd ${WK}
git checkout master
'''
} }
else { else {
sh 'git checkout develop' sh '''
cd ${WK}
git checkout develop
'''
} }
} }
sh ''' sh '''
git pull >/dev/null
cd ${WK} cd ${WK}
git pull >/dev/null
export TZ=Asia/Harbin export TZ=Asia/Harbin
date date
git clean -dfx git clean -dfx
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册