Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ebad5e8f
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
ebad5e8f
编写于
8月 31, 2022
作者:
H
Hui Li
提交者:
GitHub
8月 31, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16543 from taosdata/test/chr/TD-14699
test: modify checkpackages scritps of client
上级
7509db4d
f6c2cce5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
194 addition
and
81 deletion
+194
-81
packaging/MPtestJenkinsfile
packaging/MPtestJenkinsfile
+46
-12
packaging/debRpmAutoInstall.sh
packaging/debRpmAutoInstall.sh
+13
-0
packaging/testpackage.sh
packaging/testpackage.sh
+135
-69
未找到文件。
packaging/MPtestJenkinsfile
浏览文件 @
ebad5e8f
...
@@ -64,6 +64,11 @@ pipeline {
...
@@ -64,6 +64,11 @@ pipeline {
defaultValue:'2.1.2',
defaultValue:'2.1.2',
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:'nasPassword',
defaultValue:'password',
description: 'the pasword of the NAS server which has installPackage-192.168.1.131'
)
}
}
environment{
environment{
WORK_DIR = '/var/lib/jenkins/workspace'
WORK_DIR = '/var/lib/jenkins/workspace'
...
@@ -111,17 +116,17 @@ pipeline {
...
@@ -111,17 +116,17 @@ pipeline {
sync_source("${BRANCH_NAME}")
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
${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
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
${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_SERVER_DEB} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
bash testpackage.sh ${TD_SERVER_DEB} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
}
}
...
@@ -134,17 +139,22 @@ pipeline {
...
@@ -134,17 +139,22 @@ pipeline {
sync_source("${BRANCH_NAME}")
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 ${nasPassword}
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}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
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_
DEB} ${version} ${BASE_TD_SERVER_DEB} ${baseVersion} server ${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_
SERVER_DEB} ${version} ${BASE_TD_SERVER_DEB} ${baseVersion} server
bash testpackage.sh ${TD_
CLIENT_TAR} ${version} ${BASE_TD_CLIENT_TAR} ${baseVersion} client ${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
}
}
...
@@ -157,17 +167,17 @@ pipeline {
...
@@ -157,17 +167,17 @@ pipeline {
sync_source("${BRANCH_NAME}")
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
${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
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
${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_SERVER_RPM} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
bash testpackage.sh ${TD_SERVER_RPM} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
}
}
...
@@ -179,18 +189,42 @@ pipeline {
...
@@ -179,18 +189,42 @@ pipeline {
timeout(time: 30, unit: 'MINUTES'){
timeout(time: 30, unit: 'MINUTES'){
sync_source("${BRANCH_NAME}")
sync_source("${BRANCH_NAME}")
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_SERVER_TAR} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword}
python3 checkPackageRuning.py
'''
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_
LITE_TAR} ${version} ${BASE_TD_SERVER_LITE_TAR} ${baseVersion} server ${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
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_RPM} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server ${nasPassword}
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
'''
}
}
}
stage('arm64') {
agent{label 'linux_arm64'}
steps {
timeout(time: 30, unit: 'MINUTES'){
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}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
sh '''
sh '''
cd ${TDENGINE_ROOT_DIR}/packaging
cd ${TDENGINE_ROOT_DIR}/packaging
bash testpackage.sh ${TD_
SERVER_RPM} ${version} ${BASE_TD_SERVER_TAR} ${baseVersion} server
bash testpackage.sh ${TD_
CLIENT_ARM_TAR} ${version} ${BASE_TD_CLIENT_ARM_TAR} ${baseVersion} client ${nasPassword}
python3 checkPackageRuning.py
python3 checkPackageRuning.py
'''
'''
}
}
...
...
packaging/debRpmAutoInstall.sh
0 → 100755
浏览文件 @
ebad5e8f
#!/usr/bin/expect
set
packgeName
[
lindex
$argv
0]
set
packageSuffix
[
lindex
$argv
1]
set timeout
3
if
{
${
packageSuffix
}
==
"deb"
}
{
spawn dpkg
-i
${
packgeName
}
}
elseif
{
${
packageSuffix
}
==
"rpm"
}
{
spawn rpm
-ivh
${
packgeName
}
}
expect
"*one:"
send
"
\r
"
expect
"*skip:"
send
"
\r
"
packaging/testpackage.sh
浏览文件 @
ebad5e8f
#!/bin/sh
#!/bin/sh
#parameter
scriptDir
=
$(
dirname
$(
readlink
-f
$0
))
packgeName
=
$1
packgeName
=
$1
version
=
$2
version
=
$2
originPackageName
=
$3
originPackageName
=
$3
...
@@ -9,6 +9,17 @@ testFile=$5
...
@@ -9,6 +9,17 @@ testFile=$5
subFile
=
"taos.tar.gz"
subFile
=
"taos.tar.gz"
password
=
$6
password
=
$6
# Color setting
RED
=
'\033[41;30m'
GREEN
=
'\033[1;32m'
YELLOW
=
'\033[1;33m'
BLUE
=
'\033[1;34m'
GREEN_DARK
=
'\033[0;32m'
YELLOW_DARK
=
'\033[0;33m'
BLUE_DARK
=
'\033[0;34m'
GREEN_UNDERLINE
=
'\033[4;32m'
NC
=
'\033[0m'
if
[
${
testFile
}
=
"server"
]
;
then
if
[
${
testFile
}
=
"server"
]
;
then
tdPath
=
"TDengine-server-
${
version
}
"
tdPath
=
"TDengine-server-
${
version
}
"
originTdpPath
=
"TDengine-server-
${
originversion
}
"
originTdpPath
=
"TDengine-server-
${
originversion
}
"
...
@@ -24,146 +35,201 @@ elif [ ${testFile} = "tools" ];then
...
@@ -24,146 +35,201 @@ elif [ ${testFile} = "tools" ];then
fi
fi
function
cmdInstall
{
function
cmdInstall
{
comd
=
$1
com
man
d
=
$1
if
command
-v
${
comd
}
;
then
if
command
-v
${
com
man
d
}
;
then
echo
"
${
com
d
}
is already installed"
echo
Color YD
"
${
comman
d
}
is already installed"
else
else
if
command
-v
apt
;
then
if
command
-v
apt
;
then
apt-get
install
${
comd
}
-y
apt-get
install
${
com
man
d
}
-y
elif
command
-v
yum
;
then
elif
command
-v
yum
;
then
yum
-y
install
${
comd
}
yum
-y
install
${
com
man
d
}
echo
"you should install
${
com
d
}
manually"
echo
Color YD
"you should install
${
comman
d
}
manually"
fi
fi
fi
fi
}
}
function
echoColor
{
color
=
$1
command
=
$2
if
[
${
color
}
=
'Y'
]
;
then
echo
-e
"
${
YELLOW
}${
command
}${
NC
}
"
elif
[
${
color
}
=
'YD'
]
;
then
echo
-e
"
${
YELLOW_DARK
}${
command
}${
NC
}
"
elif
[
${
color
}
=
'R'
]
;
then
echo
-e
"
${
RED
}${
command
}${
NC
}
"
elif
[
${
color
}
=
'G'
]
;
then
echo
-e
"
${
GREEN
}${
command
}${
NC
}
\r\n
"
elif
[
${
color
}
=
'B'
]
;
then
echo
-e
"
${
BLUE
}${
command
}${
NC
}
"
elif
[
${
color
}
=
'BD'
]
;
then
echo
-e
"
${
BLUE_DARK
}${
command
}${
NC
}
"
fi
}
echo
"Uninstall all components of TDeingne"
echoColor G
"===== install basesoft ====="
cmdInstall tree
cmdInstall wget
cmdInstall sshpass
echoColor G
"===== Uninstall all components of TDeingne ====="
if
command
-v
rmtaos
;
then
if
command
-v
rmtaos
;
then
echo
"uninstall all components of TDeingne:rmtaos"
echo
Color YD
"uninstall all components of TDeingne:rmtaos"
rmtaos
rmtaos
else
else
echo
"os doesn't include TDengine
"
echoColor YD
"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
Color YD
"uninstall all components of TDeingne:rmtaostools"
rmtaostools
rmtaostools
else
else
echo
"os doesn't include rmtaostools "
echo
Color YD
"os doesn't include rmtaostools "
fi
fi
cmdInstall tree
cmdInstall wget
cmdInstall sshpass
echo
"new workroom path"
echoColor G
"===== 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"
if
[
!
-d
${
installPath
}
]
;
then
if
[
!
-d
${
installPath
}
]
;
then
echoColor BD
"mkdir -p
${
installPath
}
"
mkdir
-p
${
installPath
}
mkdir
-p
${
installPath
}
else
else
echo
"
${
installPath
}
already exists"
echo
Color YD
"
${
installPath
}
already exists"
fi
fi
if
[
!
-d
${
oriInstallPath
}
]
;
then
if
[
!
-d
${
oriInstallPath
}
]
;
then
echoColor BD
"mkdir -p
${
oriInstallPath
}
"
mkdir
-p
${
oriInstallPath
}
mkdir
-p
${
oriInstallPath
}
else
else
echo
"
${
oriInstallPath
}
already exists"
echo
Color YD
"
${
oriInstallPath
}
already exists"
fi
fi
echo
"download installPackage
"
echo
Color G
"===== download installPackage =====
"
# cd ${installPath}
# cd ${installPath}
# wget https://www.taosdata.com/assets-download/3.0/${packgeName}
# wget https://www.taosdata.com/assets-download/3.0/${packgeName}
# cd ${oriInstallPath}
# cd ${oriInstallPath}
# wget https://www.taosdata.com/assets-download/3.0/${originPackageName}
# wget https://www.taosdata.com/assets-download/3.0/${originPackageName}
cd
${
installPath
}
cd
${
installPath
}
cp
-r
${
scriptDir
}
/debRpmAutoInstall.sh
.
if
[
!
-f
{
packgeName
}
]
;
then
if
[
!
-f
{
packgeName
}
]
;
then
echoColor BD
"sshpass -p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
version
}
/community/
${
packgeName
}
."
sshpass
-p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
version
}
/community/
${
packgeName
}
.
sshpass
-p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
version
}
/community/
${
packgeName
}
.
fi
fi
if
[
!
-f
debAuto.sh
]
;
then
echo
'#!/usr/bin/expect '
>
debAuto.sh
packageSuffix
=
$(
echo
${
packgeName
}
|
awk
-F
'.'
'{print $NF}'
)
echo
'set timeout 3 '
>>
debAuto.sh
echo
'pset packgeName [lindex $argv 0]'
>>
debAuto.sh
echo
'spawn dpkg -i ${packgeName}'
>>
debAuto.sh
if
[
!
-f
debRpmAutoInstall.sh
]
;
then
echo
'expect "*one:"'
>>
debAuto.sh
echo
'#!/usr/bin/expect '
>
debRpmAutoInstall.sh
echo
'send "\r"'
>>
debAuto.sh
echo
'set packgeName [lindex $argv 0]'
>>
debRpmAutoInstall.sh
echo
'expect "*skip:"'
>>
debAuto.sh
echo
'set packageSuffix [lindex $argv 1]'
>>
debRpmAutoInstall.sh
echo
'send "\r" '
>>
debAuto.sh
echo
'set timeout 3 '
>>
debRpmAutoInstall.sh
echo
'if { ${packageSuffix} == "deb" } {'
>>
debRpmAutoInstall.sh
echo
' spawn dpkg -i ${packgeName} '
>>
debRpmAutoInstall.sh
echo
'} elseif { ${packageSuffix} == "rpm"} {'
>>
debRpmAutoInstall.sh
echo
' spawn rpm -ivh ${packgeName}'
>>
debRpmAutoInstall.sh
echo
'}'
>>
debRpmAutoInstall.sh
echo
'expect "*one:"'
>>
debRpmAutoInstall.sh
echo
'send "\r"'
>>
debRpmAutoInstall.sh
echo
'expect "*skip:"'
>>
debRpmAutoInstall.sh
echo
'send "\r" '
>>
debRpmAutoInstall.sh
fi
fi
echoColor G
"===== instal Package ====="
if
[[
${
packgeName
}
=
~
"deb"
]]
;
then
if
[[
${
packgeName
}
=
~
"deb"
]]
;
then
cd
${
installPath
}
cd
${
installPath
}
dpkg
-r
taostools
dpkg
-r
taostools
dpkg
-r
tdengine
dpkg
-r
tdengine
if
[[
${
packgeName
}
=
~
"TDengine"
]]
;
then
if
[[
${
packgeName
}
=
~
"TDengine"
]]
;
then
echo
"./debAuto.sh
${
packgeName
}
"
&&
chmod
755 debAuto.sh
&&
./debAuto.sh
${
packgeName
}
echo
Color BD
"./debRpmAutoInstall.sh
${
packgeName
}
${
packageSuffix
}
"
&&
chmod
755 debRpmAutoInstall.sh
&&
./debRpmAutoInstall.sh
${
packgeName
}
${
packageSuffix
}
else
else
echo
"dpkg -i
${
packgeName
}
"
&&
dpkg
-i
${
packgeName
}
echo
Color BD
"dpkg -i
${
packgeName
}
"
&&
dpkg
-i
${
packgeName
}
fi
fi
elif
[[
${
packgeName
}
=
~
"rpm"
]]
;
then
elif
[[
${
packgeName
}
=
~
"rpm"
]]
;
then
cd
${
installPath
}
cd
${
installPath
}
echo
"rpm
${
packgeName
}
"
&&
rpm
-ivh
${
packgeName
}
--quiet
sudo
rpm
-e
tdengine
sudo
rpm
-e
taostools
if
[[
${
packgeName
}
=
~
"TDengine"
]]
;
then
echoColor BD
"./debRpmAutoInstall.sh
${
packgeName
}
${
packageSuffix
}
"
&&
chmod
755 debRpmAutoInstall.sh
&&
./debRpmAutoInstall.sh
${
packgeName
}
${
packageSuffix
}
else
echoColor BD
"rpm -ivh
${
packgeName
}
"
&&
rpm
-ivh
${
packgeName
}
fi
elif
[[
${
packgeName
}
=
~
"tar"
]]
;
then
elif
[[
${
packgeName
}
=
~
"tar"
]]
;
then
cd
${
installPath
}
/
${
tdPath
}
if
[
${
testFile
}
=
"server"
]
;
then
echoColor BD
"bash
${
installCmd
}
-e no "
bash
${
installCmd
}
-e
no
else
echoColor BD
"bash
${
installCmd
}
"
bash
${
installCmd
}
fi
echoColor G
"===== check installPackage File of tar ====="
cd
${
oriInstallPath
}
cd
${
oriInstallPath
}
if
[
!
-f
{
originPackageName
}
]
;
then
if
[
!
-f
{
originPackageName
}
]
;
then
sshpass
-p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
originversion
}
/community
${
originPackageName
}
.
echoColor YD
"download base installPackage"
echoColor BD
"sshpass -p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
originversion
}
/community/
${
originPackageName
}
."
sshpass
-p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
originversion
}
/community/
${
originPackageName
}
.
fi
fi
echo
"tar -xvf
${
originPackageName
}
"
&&
tar
-xvf
${
originPackageName
}
echoColor YD
"unzip the base installation package"
echoColor BD
"tar -xf
${
originPackageName
}
"
&&
tar
-xf
${
originPackageName
}
cd
${
installPath
}
cd
${
installPath
}
echo
"tar -xvf
${
packgeName
}
"
&&
tar
-xvf
${
packgeName
}
echo
Color YD
"unzip the new installation package"
echoColor BD
"tar -xf
${
packgeName
}
"
&&
tar
-xf
${
packgeName
}
if
[
${
testFile
}
!=
"tools"
]
;
then
if
[
${
testFile
}
!=
"tools"
]
;
then
cd
${
installPath
}
/
${
tdPath
}
&&
tar
v
xf
${
subFile
}
cd
${
installPath
}
/
${
tdPath
}
&&
tar
xf
${
subFile
}
cd
${
oriInstallPath
}
/
${
originTdpPath
}
&&
tar
v
xf
${
subFile
}
cd
${
oriInstallPath
}
/
${
originTdpPath
}
&&
tar
xf
${
subFile
}
fi
fi
echo
"check installPackage File"
cd
${
oriInstallPath
}
/
${
originTdpPath
}
&&
tree
>
${
installPath
}
/base_
${
originversion
}
_checkfile
cd
${
installPath
}
/
${
tdPath
}
&&
tree
>
${
installPath
}
/now_
${
version
}
_checkfile
cd
${
installPath
}
cd
${
installPath
}
diff
${
installPath
}
/base_
${
originversion
}
_checkfile
${
installPath
}
/now_
${
version
}
_checkfile
>
${
installPath
}
/diffFile.log
tree
${
oriInstallPath
}
/
${
originTdpPath
}
>
${
oriInstallPath
}
/
${
originPackageName
}
_checkfile
tree
${
installPath
}
/
${
tdPath
}
>
${
installPath
}
/
${
packgeName
}
_checkfile
diff
${
installPath
}
/
${
packgeName
}
_checkfile
${
oriInstallPath
}
/
${
originPackageName
}
_checkfile
>
${
installPath
}
/diffFile.log
diffNumbers
=
`
cat
${
installPath
}
/diffFile.log |wc
-l
`
diffNumbers
=
`
cat
${
installPath
}
/diffFile.log |wc
-l
`
if
[
${
diffNumbers
}
!=
0
]
;
then
if
[
${
diffNumbers
}
!=
0
]
;
then
echo
"The number and names of files have changed from the previous installation package"
echo
Color R
"The number and names of files have changed from the previous installation package"
echo
`
cat
${
installPath
}
/diffFile.log
`
echo
Color Y
`
cat
${
installPath
}
/diffFile.log
`
exit
-1
exit
-1
else
echoColor G
"The number and names of files are the same as previous installation packages"
fi
fi
fi
cd
${
installPath
}
/
${
tdPath
}
echoColor G
"===== install taos-tools when package is lite or client ====="
if
[
${
testFile
}
=
"server"
]
;
then
bash
${
installCmd
}
-e
no
else
bash
${
installCmd
}
fi
if
[[
${
packgeName
}
=
~
"Lite"
]]
&&
[[
${
packgeName
}
=
~
"tar"
]]
;
then
cd
${
installPath
}
sshpass
-p
${
password
}
scp 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
xvf taosTools-2.1.2-Linux-x64.tar.gz
cd
taosTools-2.1.2
&&
bash install-taostools.sh
elif
[[
${
packgeName
}
=
~
"Lite"
]]
&&
[[
${
packgeName
}
=
~
"deb"
]]
;
then
cd
${
installPath
}
sshpass
-p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
version
}
/community/taosTools-2.1.2-Linux-x64.deb
.
dpkg
-i
taosTools-2.1.2-Linux-x64.deb
elif
[[
${
packgeName
}
=
~
"Lite"
]]
&&
[[
${
packgeName
}
=
~
"rpm"
]]
;
then
cd
${
installPath
}
sshpass
-p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
version
}
/community/taosTools-2.1.2-Linux-x64.rpm
.
rpm
-ivh
taosTools-2.1.2-Linux-x64.rpm
--quiet
fi
fi
if
([[
${
packgeName
}
=
~
"Lite"
]]
&&
[[
${
packgeName
}
=
~
"tar"
]])
||
[[
${
packgeName
}
=
~
"client"
]]
;
then
cd
${
installPath
}
sshpass
-p
${
password
}
scp 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
cd
${
installPath
}
sshpass
-p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
version
}
/community/taosTools-2.1.2-Linux-x64.deb
.
dpkg
-i
taosTools-2.1.2-Linux-x64.deb
elif
[[
${
packgeName
}
=
~
"Lite"
]]
&&
[[
${
packgeName
}
=
~
"rpm"
]]
;
then
cd
${
installPath
}
sshpass
-p
${
password
}
scp 192.168.1.131:/nas/TDengine3/v
${
version
}
/community/taosTools-2.1.2-Linux-x64.rpm
.
rpm
-ivh
taosTools-2.1.2-Linux-x64.rpm
--quiet
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录