From 105cd11bf9335331d4b7bb77249b92a5a24f74cc Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 14:17:59 +0800 Subject: [PATCH 01/13] test: modify checkpackages scritps --- packaging/testpackage.sh | 104 ++++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 45 deletions(-) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index 56da9e59be..b0edf2fc19 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -68,11 +68,36 @@ fi } +function wgetFile { + +file=$1 + +if [ ! -f ${file} ];then + echoColor BD "wget https://www.taosdata.com/assets-download/3.0/${file}" + wget https://www.taosdata.com/assets-download/3.0/${file} +else + echoColor YD "${file} already exists " +fi +} + +function newPath { + +buildPath=$1 + +if [ ! -d ${buildPath} ] ;then + echoColor BD "mkdir -p ${buildPath}" + mkdir -p ${buildPath} +else + echoColor YD "${buildPath} already exists" +fi + +} + + echoColor G "===== install basesoft =====" cmdInstall tree cmdInstall wget -cmdInstall sshpass echoColor G "===== Uninstall all components of TDeingne =====" @@ -97,11 +122,14 @@ echoColor G "===== new workroom path =====" installPath="/usr/local/src/packageTest" oriInstallPath="/usr/local/src/packageTest/3.1" -if [ ! -d ${installPath} ] ;then - echoColor BD "mkdir -p ${installPath}" - mkdir -p ${installPath} -else - echoColor YD "${installPath} already exists" +newPath ${installPath} + +newPath ${oriInstallPath} + + +if [ -d ${oriInstallPath}/${originTdpPath} ] ;then + echoColor BD "rm -rf ${oriInstallPath}/${originTdpPath}/*" + rm -rf ${oriInstallPath}/${originTdpPath}/* fi if [ -d ${installPath}/${tdPath} ] ;then @@ -109,33 +137,13 @@ if [ -d ${installPath}/${tdPath} ] ;then rm -rf ${installPath}/${tdPath}/* fi -if [ ! -d ${oriInstallPath} ] ;then - echoColor BD "mkdir -p ${oriInstallPath}" - mkdir -p ${oriInstallPath} -else - echoColor YD "${oriInstallPath} already exists" -fi - -if [ -d ${oriInstallPath}/${originTdpPath} ] ;then - echoColor BD "rm -rf ${oriInstallPath}/${originTdpPath}/*" - rm -rf ${oriInstallPath}/${originTdpPath}/* -fi - - echoColor G "===== download installPackage =====" -# cd ${installPath} -# wget https://www.taosdata.com/assets-download/3.0/${packgeName} -# cd ${oriInstallPath} -# wget https://www.taosdata.com/assets-download/3.0/${originPackageName} +cd ${installPath} && wgetFile ${packgeName} +cd ${oriInstallPath} && wgetFile ${originPackageName} cd ${installPath} cp -r ${scriptDir}/debRpmAutoInstall.sh . -if [ ! -f {packgeName} ];then - echoColor BD "sshpass -p ${password} scp -oStrictHostKeyChecking=no 192.168.1.131:/nas/TDengine3/v${version}/community/${packgeName} ." - sshpass -p ${password} scp -oStrictHostKeyChecking=no -oStrictHostKeyChecking=no 192.168.1.131:/nas/TDengine3/v${version}/community/${packgeName} . -fi - packageSuffix=$(echo ${packgeName} | awk -F '.' '{print $NF}') @@ -181,8 +189,7 @@ elif [[ ${packgeName} =~ "tar" ]];then cd ${oriInstallPath} if [ ! -f {originPackageName} ];then echoColor YD "download base installPackage" - echoColor BD "sshpass -p ${password} scp -oStrictHostKeyChecking=no 192.168.1.131:/nas/TDengine3/v${originversion}/community/${originPackageName} ." - sshpass -p ${password} scp -oStrictHostKeyChecking=no 192.168.1.131:/nas/TDengine3/v${originversion}/community/${originPackageName} . + wgetFile ${originPackageName} fi echoColor YD "unzip the base installation package" echoColor BD "tar -xf ${originPackageName}" && tar -xf ${originPackageName} @@ -222,24 +229,31 @@ fi cd ${installPath} -if ([[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "tar" ]]) || [[ ${packgeName} =~ "client" ]] ;then +if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] ;then echoColor G "===== install taos-tools when package is lite or client =====" cd ${installPath} - sshpass -p ${password} scp -oStrictHostKeyChecking=no 192.168.1.131:/nas/TDengine3/v${version}/community/taosTools-2.1.2-Linux-x64.tar.gz . - # wget https://www.taosdata.com/assets-download/3.0/taosTools-2.1.2-Linux-x64.tar.gz - tar xf taosTools-2.1.2-Linux-x64.tar.gz - cd taosTools-2.1.2 && bash install-taostools.sh -elif [[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "deb" ]] ;then - echoColor G "===== install taos-tools when package is lite or client =====" - cd ${installPath} - sshpass -p ${password} scp -oStrictHostKeyChecking=no 192.168.1.131:/nas/TDengine3/v${version}/community/taosTools-2.1.2-Linux-x64.tar.gz . - tar xf taosTools-2.1.2-Linux-x64.tar.gz - cd taosTools-2.1.2 && bash install-taostools.sh -elif [[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "rpm" ]] ;then - echoColor G "===== install taos-tools when package is lite or client =====" - cd ${installPath} - sshpass -p ${password} scp -oStrictHostKeyChecking=no -oStrictHostKeyChecking=no 192.168.1.131:/nas/TDengine3/v${version}/community/taosTools-2.1.2-Linux-x64.tar.gz . + wgetFile taosTools-2.1.2-Linux-x64.tar.gz . tar xf taosTools-2.1.2-Linux-x64.tar.gz cd taosTools-2.1.2 && bash install-taostools.sh fi +# if ([[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "tar" ]]) || [[ ${packgeName} =~ "client" ]] ;then +# echoColor G "===== install taos-tools when package is lite or client =====" +# cd ${installPath} +# wgetFile taosTools-2.1.2-Linux-x64.tar.gz . +# tar xf taosTools-2.1.2-Linux-x64.tar.gz +# cd taosTools-2.1.2 && bash install-taostools.sh +# elif [[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "deb" ]] ;then +# echoColor G "===== install taos-tools when package is lite or client =====" +# cd ${installPath} +# wgetFile taosTools-2.1.2-Linux-x64.tar.gz . +# tar xf taosTools-2.1.2-Linux-x64.tar.gz +# cd taosTools-2.1.2 && bash install-taostools.sh +# elif [[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "rpm" ]] ;then +# echoColor G "===== install taos-tools when package is lite or client =====" +# cd ${installPath} +# wgetFile taosTools-2.1.2-Linux-x64.tar.gz . +# tar xf taosTools-2.1.2-Linux-x64.tar.gz +# cd taosTools-2.1.2 && bash install-taostools.sh +# fi + From e258ba70816244773efc9fb05745fab1fcd7bfc5 Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 14:34:58 +0800 Subject: [PATCH 02/13] test: modify checkpackages scritps --- packaging/testpackage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index b0edf2fc19..e4dbd6a356 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -98,6 +98,7 @@ echoColor G "===== install basesoft =====" cmdInstall tree cmdInstall wget +cmdInstall expect echoColor G "===== Uninstall all components of TDeingne =====" From 11b7f4df31d5c3df8a22b1d8becbb4e2c6f1a6a3 Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 15:49:45 +0800 Subject: [PATCH 03/13] test: modify checkpackages scritps --- packaging/testpackage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index e4dbd6a356..6527f9d2c5 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -230,7 +230,7 @@ fi cd ${installPath} -if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] ;then +if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ ${packgeName} =~ "deb" ]] && [ ${packgeName} =~ "server" ]]) ([[ ${packgeName} =~ "rpm" ]] && [ ${packgeName} =~ "server" ]]) ;then echoColor G "===== install taos-tools when package is lite or client =====" cd ${installPath} wgetFile taosTools-2.1.2-Linux-x64.tar.gz . From 7dde782247cfb156a76e28a8fc2a161188c3849a Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 16:20:39 +0800 Subject: [PATCH 04/13] test: modify checkpackages scritps --- packaging/testpackage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index 6527f9d2c5..c26b2d5e21 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -230,7 +230,7 @@ fi cd ${installPath} -if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ ${packgeName} =~ "deb" ]] && [ ${packgeName} =~ "server" ]]) ([[ ${packgeName} =~ "rpm" ]] && [ ${packgeName} =~ "server" ]]) ;then +if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ ${packgeName} =~ "deb" ]] && [ ${packgeName} =~ "server" ]]) || ([[ ${packgeName} =~ "rpm" ]] && [ ${packgeName} =~ "server" ]]) ;then echoColor G "===== install taos-tools when package is lite or client =====" cd ${installPath} wgetFile taosTools-2.1.2-Linux-x64.tar.gz . From ea0d429c3e09bf288704c18b9fdc52ed9032f026 Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 16:31:21 +0800 Subject: [PATCH 05/13] test: modify checkpackages scritps of python-connector --- packaging/checkPackageRuning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/checkPackageRuning.py b/packaging/checkPackageRuning.py index c0d1e8b86c..39839452b6 100755 --- a/packaging/checkPackageRuning.py +++ b/packaging/checkPackageRuning.py @@ -24,7 +24,7 @@ import time out = subprocess.getoutput("pip3 show taospy|grep Version| awk -F ':' '{print $2}' ") print("taospy version %s "%out) if (out == "" ): - os.system("pip install git+https://github.com/taosdata/taos-connector-python.git") + os.system("pip3 install git+https://github.com/taosdata/taos-connector-python.git") print("install taos python connector") else: os.system("pip3 install --upgrade taospy ") From c14e9a308d4d489e4172e025183efabc99b15265 Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 16:32:32 +0800 Subject: [PATCH 06/13] test: modify checkpackages scritps --- packaging/testpackage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index c26b2d5e21..ee065da6ec 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -230,7 +230,7 @@ fi cd ${installPath} -if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ ${packgeName} =~ "deb" ]] && [ ${packgeName} =~ "server" ]]) || ([[ ${packgeName} =~ "rpm" ]] && [ ${packgeName} =~ "server" ]]) ;then +if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ ${packgeName} =~ "deb" ]] && [ ${packgeName} =~ "server" ]]) || ([[ ${packgeName} =~ "rpm" ]] && [[ ${packgeName} =~ "server" ]]) ;then echoColor G "===== install taos-tools when package is lite or client =====" cd ${installPath} wgetFile taosTools-2.1.2-Linux-x64.tar.gz . From bed51f207af28256a52414268caeb2f087cc5c6f Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 18:36:05 +0800 Subject: [PATCH 07/13] test: modify checkpackages scritps --- packaging/debRpmAutoInstall.sh | 2 ++ packaging/testpackage.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packaging/debRpmAutoInstall.sh b/packaging/debRpmAutoInstall.sh index 1f51378c91..3579f813e5 100755 --- a/packaging/debRpmAutoInstall.sh +++ b/packaging/debRpmAutoInstall.sh @@ -11,3 +11,5 @@ expect "*one:" send "\r" expect "*skip:" send "\r" + +expect eof \ No newline at end of file diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index ee065da6ec..d544840082 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -230,7 +230,7 @@ fi cd ${installPath} -if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ ${packgeName} =~ "deb" ]] && [ ${packgeName} =~ "server" ]]) || ([[ ${packgeName} =~ "rpm" ]] && [[ ${packgeName} =~ "server" ]]) ;then +if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ ${packgeName} =~ "deb" ]] && [[ ${packgeName} =~ "server" ]]) || ([[ ${packgeName} =~ "rpm" ]] && [[ ${packgeName} =~ "server" ]]) ;then echoColor G "===== install taos-tools when package is lite or client =====" cd ${installPath} wgetFile taosTools-2.1.2-Linux-x64.tar.gz . From aeaba78a8b0a74e0665d63def667a8fc1d17833b Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 21:05:16 +0800 Subject: [PATCH 08/13] test: modify checkpackages scritps of client --- packaging/checkPackageRuning.py | 21 ++++++++++++++------- packaging/testpackage.sh | 8 ++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packaging/checkPackageRuning.py b/packaging/checkPackageRuning.py index 39839452b6..2edeeb6dbb 100755 --- a/packaging/checkPackageRuning.py +++ b/packaging/checkPackageRuning.py @@ -19,6 +19,13 @@ import subprocess # from this import d import time + +if( len(sys.argv)>1 ): + serverHost=sys.argv[1] +else: + serverHost="localhost" + + # install taospy out = subprocess.getoutput("pip3 show taospy|grep Version| awk -F ':' '{print $2}' ") @@ -32,19 +39,19 @@ else: # start taosd prepare -os.system("rm -rf /var/lib/taos/*") -os.system("systemctl restart taosd ") +# os.system("rm -rf /var/lib/taos/*") +# os.system("systemctl restart taosd ") # wait a moment ,at least 5 seconds time.sleep(5) # prepare data by taosBenchmark -os.system("taosBenchmark -y -n 100 -t 100") +os.system("taosBenchmark -y -n 100 -t 100 -h %s "%serverHost ) import taos -conn = taos.connect(host="localhost", +conn = taos.connect(host="%s"%serverHost, user="root", password="taosdata", database="test", @@ -80,15 +87,15 @@ os.system("rm -rf /tmp/dumpdata/*") # dump data out print("taosdump dump out data") -os.system("taosdump -o /tmp/dumpdata -D test -y ") +os.system("taosdump -o /tmp/dumpdata -D test -y -h %s "%serverHost) # drop database of test print("drop database test") -os.system(" taos -s ' drop database test ;' ") +os.system(" taos -s ' drop database test ;' -h %s "%serverHost) # dump data in print("taosdump dump data in") -os.system("taosdump -i /tmp/dumpdata -y ") +os.system("taosdump -i /tmp/dumpdata -y -h %s "%serverHost) result = conn.query("SELECT count(*) from test.meters") diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index d544840082..dce38ce483 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -238,6 +238,14 @@ if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ $ cd taosTools-2.1.2 && bash install-taostools.sh fi +echoColor G "===== start TDengine =====" + +if [[ ${packgeName} =~ "server" ]] ;then + echoColor BD " rm -rf /var/lib/taos/* && systemctl restart taosd " + rm -rf /var/lib/taos/* + systemctl restart taosd + + # if ([[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "tar" ]]) || [[ ${packgeName} =~ "client" ]] ;then # echoColor G "===== install taos-tools when package is lite or client =====" # cd ${installPath} From 76128ee54835602c946d528c0131ed152a62272b Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 21:07:46 +0800 Subject: [PATCH 09/13] test: modify checkpackages scritps of client --- packaging/testpackage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index dce38ce483..03f665d0cb 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -244,7 +244,7 @@ if [[ ${packgeName} =~ "server" ]] ;then echoColor BD " rm -rf /var/lib/taos/* && systemctl restart taosd " rm -rf /var/lib/taos/* systemctl restart taosd - +fi # if ([[ ${packgeName} =~ "Lite" ]] && [[ ${packgeName} =~ "tar" ]]) || [[ ${packgeName} =~ "client" ]] ;then # echoColor G "===== install taos-tools when package is lite or client =====" From 6b107a8522818cceabdd1a809698dea2a7f44791 Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 22:40:05 +0800 Subject: [PATCH 10/13] test:update piplines of mptest --- packaging/MPtestJenkinsfile | 107 ++++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 46 deletions(-) diff --git a/packaging/MPtestJenkinsfile b/packaging/MPtestJenkinsfile index 77f642180a..5b79345916 100644 --- a/packaging/MPtestJenkinsfile +++ b/packaging/MPtestJenkinsfile @@ -5,13 +5,6 @@ def sync_source(branch_name) { echo ''' + branch_name + ''' ''' sh ''' - cd ${TDINTERNAL_ROOT_DIR} - git reset --hard - git fetch || git fetch - git checkout ''' + branch_name + ''' -f - git branch - git pull || git pull - git log | head -n 20 cd ${TDENGINE_ROOT_DIR} git reset --hard git fetch || git fetch @@ -64,17 +57,12 @@ pipeline { defaultValue:'2.1.2', description: 'This number of baseVerison is generally not modified.Now it is 3.0.0.1' ) - string ( - name:'nasPassword', - defaultValue:'password', - description: 'the pasword of the NAS server which has installPackage-192.168.1.131' - ) } environment{ WORK_DIR = '/var/lib/jenkins/workspace' TDINTERNAL_ROOT_DIR = '/var/lib/jenkins/workspace/TDinternal' TDENGINE_ROOT_DIR = '/var/lib/jenkins/workspace/TDinternal/community' - BRANCH_NAME = '3.0' + BRANCH_NAME = 'test/chr/TD-14699' TD_SERVER_TAR = "TDengine-server-${version}-Linux-x64.tar.gz" BASE_TD_SERVER_TAR = "TDengine-server-${baseVersion}-Linux-x64.tar.gz" @@ -107,7 +95,7 @@ pipeline { } stages { - stage ('RUN') { + stage ('Test Server') { parallel { stage('ubuntu16') { agent{label " ubuntu16 "} @@ -116,17 +104,17 @@ pipeline { sync_source("${BRANCH_NAME}") sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_DEB} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_DEB} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' } @@ -139,24 +127,21 @@ pipeline { sync_source("${BRANCH_NAME}") sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_DEB} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword} - python3 checkPackageRuning.py - ''' - sh ''' - cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_CLIENT_TAR} ${version} ${BASE_TD_CLIENT_TAR} ${baseVersion} client ${nasPassword} + bash testpackage.sh ${TD_SERVER_DEB} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server python3 checkPackageRuning.py + dpkg -r tdengine ''' + } } } @@ -167,17 +152,17 @@ pipeline { sync_source("${BRANCH_NAME}") sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_RPM} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_RPM} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' } @@ -190,28 +175,23 @@ pipeline { sync_source("${BRANCH_NAME}") sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_RPM} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_RPM} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server python3 checkPackageRuning.py - ''' - sh ''' - cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_CLIENT_LITE_TAR} ${version} ${BASE_TD_CLIENT_LITE_TAR} ${baseVersion} client ${nasPassword} - python3 checkPackageRuning.py - ''' + sudo rpm -e tdengine + ''' } } - } - + } stage('arm64') { agent{label 'linux_arm64'} steps { @@ -219,18 +199,53 @@ pipeline { sync_source("${BRANCH_NAME}") sh ''' cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_SERVER_ARM_TAR} ${version} ${BASE_TD_SERVER_ARM_TAR} ${baseVersion} server ${nasPassword} + bash testpackage.sh ${TD_SERVER_ARM_TAR} ${version} ${BASE_TD_SERVER_ARM_TAR} ${baseVersion} server python3 checkPackageRuning.py ''' - sh ''' - cd ${TDENGINE_ROOT_DIR}/packaging - bash testpackage.sh ${TD_CLIENT_ARM_TAR} ${version} ${BASE_TD_CLIENT_ARM_TAR} ${baseVersion} client ${nasPassword} - python3 checkPackageRuning.py - ''' } } } } } - } + stage ('Test Client') { + parallel { + stage('ubuntu18') { + agent{label " ubuntu18 "} + steps { + timeout(time: 30, unit: 'MINUTES'){ + sh ''' + cd ${TDENGINE_ROOT_DIR}/packaging + bash testpackage.sh ${TD_CLIENT_TAR} ${version} ${BASE_TD_CLIENT_TAR} ${baseVersion} client + python3 checkPackageRuning.py 192.168.0.21 + ''' + } + } + } + stage('centos8') { + agent{label " centos8_3 "} + steps { + timeout(time: 30, unit: 'MINUTES'){ + sh ''' + cd ${TDENGINE_ROOT_DIR}/packaging + bash testpackage.sh ${TD_CLIENT_LITE_TAR} ${version} ${BASE_TD_CLIENT_LITE_TAR} ${baseVersion} client + python3 checkPackageRuning.py 192.168.0.24 + ''' + } + } + } + } + } + stage('arm64-client') { + agent{label " linux_arm64 "} + steps { + timeout(time: 30, unit: 'MINUTES'){ + sh ''' + cd ${TDENGINE_ROOT_DIR}/packaging + bash testpackage.sh ${TD_CLIENT_ARM_TAR} ${version} ${BASE_TD_CLIENT_ARM_TAR} ${baseVersion} client + python3 checkPackageRuning.py 192.168.0.21 + ''' + } + } + } + } } \ No newline at end of file From 5674429475a05dc3cf945342232d37172ff9b4ae Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 22:54:50 +0800 Subject: [PATCH 11/13] test: modify checkpackages scritps of arm64 --- packaging/testpackage.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index 03f665d0cb..d1d1efafed 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -236,6 +236,12 @@ if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ $ wgetFile taosTools-2.1.2-Linux-x64.tar.gz . tar xf taosTools-2.1.2-Linux-x64.tar.gz cd taosTools-2.1.2 && bash install-taostools.sh +elif ([[ ${packgeName} =~ "arm64" ]] && [[ ${packgeName} =~ "server" ]]);then + echoColor G "===== install taos-tools when package is lite or client =====" + cd ${installPath} + wgetFile taosTools-2.1.2-Linux-arm64.tar.gz . + tar xf taosTools-2.1.2-Linux-arm64.tar.gz + cd taosTools-2.1.2 && bash install-taostools.sh fi echoColor G "===== start TDengine =====" From 27e1e332b14a901b0972f0b6d3ddcc315adf795e Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 23:16:40 +0800 Subject: [PATCH 12/13] test: modify checkpackages scritps of arm64 --- packaging/testpackage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index d1d1efafed..2101ddbf1c 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -236,7 +236,7 @@ if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ $ wgetFile taosTools-2.1.2-Linux-x64.tar.gz . tar xf taosTools-2.1.2-Linux-x64.tar.gz cd taosTools-2.1.2 && bash install-taostools.sh -elif ([[ ${packgeName} =~ "arm64" ]] && [[ ${packgeName} =~ "server" ]]);then +elif ([[ ${packgeName} =~ "arm64" ]] && [[ ${packgeName} =~ "client" ]]);then echoColor G "===== install taos-tools when package is lite or client =====" cd ${installPath} wgetFile taosTools-2.1.2-Linux-arm64.tar.gz . From 07dd0e30defa40701d958c596a33b3afaaf7b6f8 Mon Sep 17 00:00:00 2001 From: tomchon Date: Thu, 1 Sep 2022 23:36:56 +0800 Subject: [PATCH 13/13] test: modify checkpackages scritps of arm64 --- packaging/testpackage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index 2101ddbf1c..c018a81158 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -230,14 +230,14 @@ fi cd ${installPath} -if [[ ${packgeName} =~ "Lite" ]] || [[ ${packgeName} =~ "client" ]] || ([[ ${packgeName} =~ "deb" ]] && [[ ${packgeName} =~ "server" ]]) || ([[ ${packgeName} =~ "rpm" ]] && [[ ${packgeName} =~ "server" ]]) ;then +if [[ ${packgeName} =~ "Lite" ]] || ([[ ${packgeName} =~ "x64" ]] && [[ ${packgeName} =~ "client" ]]) || ([[ ${packgeName} =~ "deb" ]] && [[ ${packgeName} =~ "server" ]]) || ([[ ${packgeName} =~ "rpm" ]] && [[ ${packgeName} =~ "server" ]]) ;then echoColor G "===== install taos-tools when package is lite or client =====" cd ${installPath} wgetFile taosTools-2.1.2-Linux-x64.tar.gz . tar xf taosTools-2.1.2-Linux-x64.tar.gz cd taosTools-2.1.2 && bash install-taostools.sh elif ([[ ${packgeName} =~ "arm64" ]] && [[ ${packgeName} =~ "client" ]]);then - echoColor G "===== install taos-tools when package is lite or client =====" + echoColor G "===== install taos-tools arm when package is arm64-client =====" cd ${installPath} wgetFile taosTools-2.1.2-Linux-arm64.tar.gz . tar xf taosTools-2.1.2-Linux-arm64.tar.gz