提交 057c7747 编写于 作者: T tangfangzhi

use enterprise edition to test

上级 6a94ad73
...@@ -47,36 +47,60 @@ def pre_test(){ ...@@ -47,36 +47,60 @@ def pre_test(){
script { script {
if (env.CHANGE_TARGET == 'master') { if (env.CHANGE_TARGET == 'master') {
sh ''' sh '''
cd ${WK}
git checkout master
cd ${WKC} cd ${WKC}
git checkout master git checkout master
''' '''
} else if(env.CHANGE_TARGET == '2.0') { } else if(env.CHANGE_TARGET == '2.0') {
sh ''' sh '''
cd ${WK}
git checkout 2.0
cd ${WKC} cd ${WKC}
git checkout 2.0 git checkout 2.0
''' '''
} else if(env.CHANGE_TARGET == '3.0') { } else if(env.CHANGE_TARGET == '3.0') {
sh ''' sh '''
cd ${WK}
git checkout 3.0
cd ${WKC} cd ${WKC}
git checkout 3.0 git checkout 3.0
[ -d contrib/bdb ] && cd contrib/bdb && git clean -fxd && cd ../.. [ -d contrib/bdb ] && cd contrib/bdb && git clean -fxd && cd ../..
''' '''
} else { } else {
sh ''' sh '''
cd ${WK}
git checkout develop
cd ${WKC} cd ${WKC}
git checkout develop git checkout develop
''' '''
} }
} }
if (env.CHANGE_URL =~ /\/TDengine\//) {
sh '''
cd ${WKC}
git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD
'''
} else if (env.CHANGE_URL =~ /\/TDinternal\//) {
sh '''
cd ${WK}
git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD
'''
} else {
sh '''
echo "unmatched reposiotry ${CHANGE_URL}"
'''
}
sh ''' sh '''
cd ${WKC} cd ${WKC}
git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD
git submodule update --init --recursive git submodule update --init --recursive
''' '''
sh ''' sh '''
cd ${WKC} cd ${WK}
export TZ=Asia/Harbin export TZ=Asia/Harbin
date date
rm -rf debug rm -rf debug
...@@ -162,8 +186,8 @@ pipeline { ...@@ -162,8 +186,8 @@ pipeline {
options { skipDefaultCheckout() } options { skipDefaultCheckout() }
environment{ environment{
WK = '/var/lib/jenkins/workspace/TDinternal' WK = '/var/lib/jenkins/workspace/TDinternal'
WKC= '/var/lib/jenkins/workspace/TDengine' WKC = '/var/lib/jenkins/workspace/TDinternal/community'
WKPY= '/var/lib/jenkins/workspace/taos-connector-python' WKPY = '/var/lib/jenkins/workspace/taos-connector-python'
} }
stages { stages {
stage('run test') { stage('run test') {
...@@ -177,15 +201,31 @@ pipeline { ...@@ -177,15 +201,31 @@ pipeline {
steps { steps {
timeout(time: 45, unit: 'MINUTES'){ timeout(time: 45, unit: 'MINUTES'){
pre_test() pre_test()
sh ''' if (env.CHANGE_URL =~ /\/TDengine\//) {
cd ${WKC}/debug sh '''
ctest -VV cd ${WK}/debug
''' ctest -VV
sh ''' '''
export LD_LIBRARY_PATH=${WKC}/debug/build/lib sh '''
cd ${WKC}/tests/system-test export LD_LIBRARY_PATH=${WK}/debug/build/lib
./fulltest.sh cd ${WKC}/tests/system-test
''' ./fulltest.sh
'''
} else if (env.CHANGE_URL =~ /\/TDinternal\//) {
sh '''
cd ${WKC}/debug
ctest -VV
'''
sh '''
export LD_LIBRARY_PATH=${WKC}/debug/build/lib
cd ${WKC}/tests/system-test
./fulltest.sh
'''
} else {
sh '''
echo "unmatched reposiotry ${CHANGE_URL}"
'''
}
sh ''' sh '''
cd ${WKC}/tests cd ${WKC}/tests
./test-all.sh b1fq ./test-all.sh b1fq
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册