Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
68c36479
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
68c36479
编写于
8月 29, 2022
作者:
H
Hui Li
提交者:
GitHub
8月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16483 from taosdata/test/chr/TD-14699
test: add checkpackages scritps
上级
c809633a
8a59420c
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
80 addition
and
21 deletion
+80
-21
packaging/MPtestJenkinsfile
packaging/MPtestJenkinsfile
+23
-15
packaging/checkPackageRuning.py
packaging/checkPackageRuning.py
+3
-1
packaging/testpackage.sh
packaging/testpackage.sh
+54
-5
未找到文件。
packaging/MPtestJenkinsfile
浏览文件 @
68c36479
def sync_source(branch_name) {
def sync_source(branch_name) {
sh '''
sh '''
hostname
hostname
IP
env
env
echo ''' + branch_name + '''
echo ''' + branch_name + '''
'''
'''
...
@@ -15,6 +16,7 @@ def sync_source(branch_name) {
...
@@ -15,6 +16,7 @@ def sync_source(branch_name) {
cd ${TDENGINE_ROOT_DIR}
cd ${TDENGINE_ROOT_DIR}
git reset --hard
git reset --hard
git fetch || git fetch
git fetch || git fetch
rm -rf examples/rust/
git checkout ''' + branch_name + ''' -f
git checkout ''' + branch_name + ''' -f
git branch
git branch
git pull || git pull
git pull || git pull
...
@@ -53,6 +55,16 @@ pipeline {
...
@@ -53,6 +55,16 @@ pipeline {
defaultValue:'3.0.0.1',
defaultValue:'3.0.0.1',
description: 'This number of baseVerison is generally not modified.Now it is 3.0.0.1'
description: 'This number of baseVerison is generally not modified.Now it is 3.0.0.1'
)
)
string (
name:'toolsVersion',
defaultValue:'2.1.2',
description: 'This number of baseVerison is generally not modified.Now it is 3.0.0.1'
)
string (
name:'toolsBaseVersion',
defaultValue:'2.1.2',
description: 'This number of baseVerison is generally not modified.Now it is 3.0.0.1'
)
}
}
environment{
environment{
WORK_DIR = '/var/lib/jenkins/workspace'
WORK_DIR = '/var/lib/jenkins/workspace'
...
@@ -86,26 +98,18 @@ pipeline {
...
@@ -86,26 +98,18 @@ pipeline {
TD_CLIENT_EXE = "TDengine-client-${version}-Windows-x64.exe"
TD_CLIENT_EXE = "TDengine-client-${version}-Windows-x64.exe"
TD_TOOLS_TAR = "taosTools-${toolsVersion}-Linux-x64.tar.gz"
}
}
stages {
stages {
stage ('RUN') {
stage ('RUN') {
stage('get check package scritps'){
agent{label 'ubuntu18'}
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
script{
sync_source("${BRANCH_NAME}")
}
}
}
}
parallel {
parallel {
stage('ubuntu16') {
stage('ubuntu16') {
agent{label " ubuntu16 "}
agent{label " ubuntu16 "}
steps {
steps {
timeout(time: 3, unit: 'MINUTES'){
timeout(time: 10, unit: 'MINUTES'){
sync_source("${BRANCH_NAME}")
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
...
@@ -128,7 +132,8 @@ pipeline {
...
@@ -128,7 +132,8 @@ pipeline {
stage('ubuntu18') {
stage('ubuntu18') {
agent{label " ubuntu18 "}
agent{label " ubuntu18 "}
steps {
steps {
timeout(time: 3, unit: 'MINUTES'){
timeout(time: 10, unit: 'MINUTES'){
sync_source("${BRANCH_NAME}")
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
...
@@ -151,7 +156,8 @@ pipeline {
...
@@ -151,7 +156,8 @@ pipeline {
stage('centos7') {
stage('centos7') {
agent{label " centos7_9 "}
agent{label " centos7_9 "}
steps {
steps {
timeout(time: 240, unit: 'MINUTES'){
timeout(time: 10, unit: 'MINUTES'){
sync_source("${BRANCH_NAME}")
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
...
@@ -161,6 +167,7 @@ pipeline {
...
@@ -161,6 +167,7 @@ pipeline {
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server
bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server
bash testpackage.sh ${TD_SERVER_LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
sh '''
sh '''
...
@@ -174,7 +181,8 @@ pipeline {
...
@@ -174,7 +181,8 @@ pipeline {
stage('centos8') {
stage('centos8') {
agent{label " centos8_3 "}
agent{label " centos8_3 "}
steps {
steps {
timeout(time: 240, unit: 'MINUTES'){
timeout(time: 10, unit: 'MINUTES'){
sync_source("${BRANCH_NAME}")
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
...
...
packaging/checkPackageRuning.py
浏览文件 @
68c36479
...
@@ -22,10 +22,12 @@ import time
...
@@ -22,10 +22,12 @@ import time
# install taospy
# install taospy
out
=
subprocess
.
getoutput
(
"pip3 show taospy|grep Version| awk -F ':' '{print $2}' "
)
out
=
subprocess
.
getoutput
(
"pip3 show taospy|grep Version| awk -F ':' '{print $2}' "
)
print
(
out
)
print
(
"taospy version %s "
%
out
)
if
(
out
==
""
):
if
(
out
==
""
):
os
.
system
(
"pip install git+https://github.com/taosdata/taos-connector-python.git"
)
os
.
system
(
"pip install git+https://github.com/taosdata/taos-connector-python.git"
)
print
(
"install taos python connector"
)
print
(
"install taos python connector"
)
else
:
os
.
system
(
"pip3 install --upgrade taospy "
)
...
...
packaging/testpackage.sh
浏览文件 @
68c36479
#!/bin/sh
#!/bin/sh
# function installPkgAndCheckFile{
# # ============================= get input parameters =================================================
echo
"Download package"
# # install.sh -v [server | client] -e [yes | no] -i [systemd | service | ...]
# # set parameters by default value
# interactiveFqdn=yes # [yes | no]
# verType=server # [server | client]
# initType=systemd # [systemd | service | ...]
# while getopts "hv:d:" arg
# do
# case $arg in
# d)
# #echo "interactiveFqdn=$OPTARG"
# script_dir=$( echo $OPTARG )
# ;;
# h)
# echo "Usage: `basename $0` -d scripy_path"
# exit 0
# ;;
# ?) #unknow option
# echo "unkonw argument"
# exit 1
# ;;
# esac
# done
# echo "Download package"
packgeName
=
$1
packgeName
=
$1
version
=
$2
version
=
$2
...
@@ -25,22 +49,42 @@ elif [ ${testFile} = "tools" ];then
...
@@ -25,22 +49,42 @@ elif [ ${testFile} = "tools" ];then
installCmd
=
"install-taostools.sh"
installCmd
=
"install-taostools.sh"
fi
fi
function
cmdInstall
{
comd
=
$1
if
command
-v
${
comd
}
;
then
echo
"
${
comd
}
is already installed"
else
if
command
-v
apt
;
then
apt-get
install
${
comd
}
elif
command
-v
yum
;
then
yum
install
${
comd
}
else
echo
"you should install
${
comd
}
manually"
fi
fi
}
echo
"Uninstall all components of TDeingne"
echo
"Uninstall all components of TDeingne"
if
command
-v
rmtaos
;
then
if
command
-v
rmtaos
;
then
echo
"uninstall all components of TDeingne:rmtaos"
echo
"uninstall all components of TDeingne:rmtaos"
echo
" "
rmtaos
else
else
echo
"os doesn't include TDengine "
echo
"os doesn't include TDengine "
fi
fi
if
command
-v
rmtaostools
;
then
if
command
-v
rmtaostools
;
then
echo
"uninstall all components of TDeingne:rmtaostools"
echo
"uninstall all components of TDeingne:rmtaostools"
echo
" "
rmtaostools
else
else
echo
"os doesn't include rmtaostools "
echo
"os doesn't include rmtaostools "
fi
fi
cmdInstall tree
cmdInstall wget
echo
"new workroom path"
echo
"new workroom path"
installPath
=
"/usr/local/src/packageTest"
installPath
=
"/usr/local/src/packageTest"
oriInstallPath
=
"/usr/local/src/packageTest/3.1"
oriInstallPath
=
"/usr/local/src/packageTest/3.1"
...
@@ -104,6 +148,11 @@ elif [[ ${packgeName} =~ "tar" ]];then
...
@@ -104,6 +148,11 @@ elif [[ ${packgeName} =~ "tar" ]];then
else
else
bash
${
installCmd
}
bash
${
installCmd
}
fi
fi
if
[[
${
packgeName
}
=
~
"Lite"
]]
;
then
cd
${
installPath
}
wget https://www.taosdata.com/assets-download/3.0/taosTools-2.1.2-Linux-x64.tar.gz
tar
xvf taosTools-2.1.2-Linux-x64.tar.gz
cd
taosTools-2.1.2
&&
bash install-taostools.sh
fi
fi
# }
# }
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录