[TD-5783]<CI>add test for 2.0 branch (#7153)

* [TD-5783]<CI>add test for 2.0 branch

* fix

* fix
This commit is contained in:
Yiqing Liu 2021-08-04 18:18:34 +08:00 committed by GitHub
parent f5a9b37c28
commit 891978882a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 20 deletions

View File

@ -23,6 +23,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
name: test_arm64 name: test_arm64
@ -48,6 +49,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
name: test_arm name: test_arm
@ -73,6 +75,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
@ -100,6 +103,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
name: build_xenial name: build_xenial
@ -125,6 +129,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
@ -150,6 +155,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
name: build_centos7 name: build_centos7
@ -173,6 +179,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
@ -191,6 +198,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
depends_on: depends_on:

18
Jenkinsfile vendored
View File

@ -41,6 +41,7 @@ def pre_test(){
sh ''' sh '''
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"
killall -9 python3.8 || echo "no python program running"
cd ${WKC} cd ${WKC}
git reset --hard HEAD~10 >/dev/null git reset --hard HEAD~10 >/dev/null
''' '''
@ -51,6 +52,12 @@ def pre_test(){
git checkout master git checkout master
''' '''
} }
else if(env.CHANGE_TARGET == '2.0'){
sh '''
cd ${WKC}
git checkout 2.0
'''
}
else{ else{
sh ''' sh '''
cd ${WKC} cd ${WKC}
@ -74,6 +81,12 @@ def pre_test(){
git checkout master git checkout master
''' '''
} }
else if(env.CHANGE_TARGET == '2.0'){
sh '''
cd ${WK}
git checkout 2.0
'''
}
else{ else{
sh ''' sh '''
cd ${WK} cd ${WK}
@ -223,12 +236,14 @@ pipeline {
steps { steps {
pre_test() pre_test()
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
timeout(time: 60, unit: 'MINUTES'){
sh ''' sh '''
cd ${WKC}/tests/pytest cd ${WKC}/tests/pytest
./crash_gen.sh -a -p -t 4 -s 2000 ./crash_gen.sh -a -p -t 4 -s 2000
''' '''
} }
}
timeout(time: 60, unit: 'MINUTES'){
sh ''' sh '''
cd ${WKC}/tests/pytest cd ${WKC}/tests/pytest
rm -rf /var/lib/taos/* rm -rf /var/lib/taos/*
@ -241,6 +256,7 @@ pipeline {
rm -rf /var/log/taos/* rm -rf /var/log/taos/*
./handle_taosd_val_log.sh ./handle_taosd_val_log.sh
''' '''
}
timeout(time: 45, unit: 'MINUTES'){ timeout(time: 45, unit: 'MINUTES'){
sh ''' sh '''
date date