未验证 提交 718f8c5e 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

Enhance/sangshuduo/td 12104 donot build taostools (#9080)

* [TD-12104]<enhance>: don't build taos-tools by default

* update README.md to align with taos-tools change

* fix wording

* update Jenkinsfile

* make taos-tools not built on more platforms
Co-authored-by: Nliuyq-617 <yqliu@taosdata.com>
上级 eefaaf02
...@@ -67,6 +67,7 @@ def pre_test(){ ...@@ -67,6 +67,7 @@ def pre_test(){
} }
sh''' sh'''
cd ${WKC} cd ${WKC}
git remote prune origin
[ -f src/connector/grafanaplugin/README.md ] && rm -f src/connector/grafanaplugin/README.md > /dev/null || echo "failed to remove grafanaplugin README.md" [ -f src/connector/grafanaplugin/README.md ] && rm -f src/connector/grafanaplugin/README.md > /dev/null || echo "failed to remove grafanaplugin README.md"
git pull >/dev/null git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge git fetch origin +refs/pull/${CHANGE_ID}/merge
...@@ -105,7 +106,7 @@ def pre_test(){ ...@@ -105,7 +106,7 @@ def pre_test(){
git clean -dfx git clean -dfx
mkdir debug mkdir debug
cd debug cd debug
cmake .. -DBUILD_HTTP=false > /dev/null cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true > /dev/null
make > /dev/null make > /dev/null
make install > /dev/null make install > /dev/null
cd ${WKC}/tests cd ${WKC}/tests
...@@ -141,6 +142,7 @@ def pre_test_noinstall(){ ...@@ -141,6 +142,7 @@ def pre_test_noinstall(){
} }
sh''' sh'''
cd ${WKC} cd ${WKC}
git remote prune origin
[ -f src/connector/grafanaplugin/README.md ] && rm -f src/connector/grafanaplugin/README.md > /dev/null || echo "failed to remove grafanaplugin README.md" [ -f src/connector/grafanaplugin/README.md ] && rm -f src/connector/grafanaplugin/README.md > /dev/null || echo "failed to remove grafanaplugin README.md"
git pull >/dev/null git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge git fetch origin +refs/pull/${CHANGE_ID}/merge
...@@ -179,7 +181,7 @@ def pre_test_noinstall(){ ...@@ -179,7 +181,7 @@ def pre_test_noinstall(){
git clean -dfx git clean -dfx
mkdir debug mkdir debug
cd debug cd debug
cmake .. -DBUILD_HTTP=false > /dev/null cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=false > /dev/null
make make
''' '''
return 1 return 1
...@@ -212,6 +214,7 @@ def pre_test_mac(){ ...@@ -212,6 +214,7 @@ def pre_test_mac(){
} }
sh''' sh'''
cd ${WKC} cd ${WKC}
git remote prune origin
[ -f src/connector/grafanaplugin/README.md ] && rm -f src/connector/grafanaplugin/README.md > /dev/null || echo "failed to remove grafanaplugin README.md" [ -f src/connector/grafanaplugin/README.md ] && rm -f src/connector/grafanaplugin/README.md > /dev/null || echo "failed to remove grafanaplugin README.md"
git pull >/dev/null git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge git fetch origin +refs/pull/${CHANGE_ID}/merge
...@@ -250,7 +253,7 @@ def pre_test_mac(){ ...@@ -250,7 +253,7 @@ def pre_test_mac(){
git clean -dfx git clean -dfx
mkdir debug mkdir debug
cd debug cd debug
cmake .. > /dev/null cmake .. -DBUILD_TOOLS=false > /dev/null
go env -w GOPROXY=https://goproxy.cn,direct go env -w GOPROXY=https://goproxy.cn,direct
go env -w GO111MODULE=on go env -w GO111MODULE=on
cmake --build . cmake --build .
...@@ -289,6 +292,7 @@ def pre_test_win(){ ...@@ -289,6 +292,7 @@ def pre_test_win(){
} }
bat''' bat'''
cd C:\\workspace\\TDinternal\\community cd C:\\workspace\\TDinternal\\community
git remote prune origin
git pull git pull
git fetch origin +refs/pull/%CHANGE_ID%/merge git fetch origin +refs/pull/%CHANGE_ID%/merge
git checkout -qf FETCH_HEAD git checkout -qf FETCH_HEAD
...@@ -415,13 +419,11 @@ pipeline { ...@@ -415,13 +419,11 @@ pipeline {
./test-all.sh p1 ./test-all.sh p1
date''' date'''
} }
} }
} }
stage('python_2_s5') { stage('python_2_s5') {
agent{label " slave5 || slave15 "} agent{label " slave5 || slave15 "}
steps { steps {
pre_test() pre_test()
timeout(time: 55, unit: 'MINUTES'){ timeout(time: 55, unit: 'MINUTES'){
sh ''' sh '''
...@@ -592,7 +594,6 @@ pipeline { ...@@ -592,7 +594,6 @@ pipeline {
// ./test-all.sh full jdbc // ./test-all.sh full jdbc
// cd ${WKC}/tests // cd ${WKC}/tests
// ./test-all.sh full unit // ./test-all.sh full unit
} }
} }
} }
...@@ -623,7 +624,6 @@ pipeline { ...@@ -623,7 +624,6 @@ pipeline {
cd ${WKC}/tests cd ${WKC}/tests
./test-all.sh b6fq ./test-all.sh b6fq
date''' date'''
} }
} }
} }
...@@ -719,7 +719,6 @@ pipeline { ...@@ -719,7 +719,6 @@ pipeline {
stage('test'){ stage('test'){
agent{label "win"} agent{label "win"}
steps{ steps{
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
pre_test_win() pre_test_win()
timeout(time: 20, unit: 'MINUTES'){ timeout(time: 20, unit: 'MINUTES'){
...@@ -734,8 +733,6 @@ pipeline { ...@@ -734,8 +733,6 @@ pipeline {
} }
} }
} }
} }
} }
} }
...@@ -766,7 +763,6 @@ pipeline { ...@@ -766,7 +763,6 @@ pipeline {
<li>提交信息:${env.CHANGE_TITLE}</li> <li>提交信息:${env.CHANGE_TITLE}</li>
<li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li> <li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li>
<li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li> <li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li>
</div> </div>
</ul> </ul>
</td> </td>
...@@ -804,7 +800,6 @@ pipeline { ...@@ -804,7 +800,6 @@ pipeline {
<li>提交信息:${env.CHANGE_TITLE}</li> <li>提交信息:${env.CHANGE_TITLE}</li>
<li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li> <li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li>
<li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li> <li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li>
</div> </div>
</ul> </ul>
</td> </td>
......
...@@ -59,6 +59,9 @@ sudo apt-get install -y maven ...@@ -59,6 +59,9 @@ sudo apt-get install -y maven
``` ```
#### Install build dependencies for taos-tools #### Install build dependencies for taos-tools
We provide a few useful tools such as taosBenchmark (was named taosdemo) and taosdump. They were part of TDengine. From TDengine 2.4.0.0, taosBenchmark and taosdump were not released together with TDengine.
By default, TDengine compiling does not include taos-tools. You can use 'cmake .. -DBUILD_TOOLS=true' to make them be compiled with TDengine.
To build the [taos-tools](https://github.com/taosdata/taos-tools) on Ubuntu/Debian, the following packages need to be installed. To build the [taos-tools](https://github.com/taosdata/taos-tools) on Ubuntu/Debian, the following packages need to be installed.
```bash ```bash
sudo apt install libjansson-dev libsnappy-dev liblzma-dev libz-dev pkg-config sudo apt install libjansson-dev libsnappy-dev liblzma-dev libz-dev pkg-config
...@@ -142,7 +145,7 @@ mkdir debug && cd debug ...@@ -142,7 +145,7 @@ mkdir debug && cd debug
cmake .. && cmake --build . cmake .. && cmake --build .
``` ```
Note TDengine 2.3.x.0 and later use a component named 'taosAdapter' to play http daemon role by default instead of the http daemon embedded in the early version of TDengine. The taosAdapter is programmed by go language. If you pull TDengine source code to the latest from an existing codebase, please execute 'git submodule update --init --recursive' to pull taosAdapter source code. Please install go language 1.14 or above for compiling taosAdapter. If you meet difficulties regarding 'go mod', especially you are from China, you can use a proxy to solve the problem. Note TDengine 2.3.x.0 and later use a component named 'taosAdapter' to play http daemon role by default instead of the http daemon embedded in the early version of TDengine. The taosAdapter is programmed by go language. If you pull TDengine source code to the latest from an existing codebase, please execute 'git submodule update --init --recursive' to pull taosAdapter source code. Please install go language version 1.14 or above for compiling taosAdapter. If you meet difficulties regarding 'go mod', especially you are from China, you can use a proxy to solve the problem.
``` ```
go env -w GO111MODULE=on go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct go env -w GOPROXY=https://goproxy.cn,direct
......
...@@ -168,7 +168,7 @@ IF ("${BUILD_TOOLS}" STREQUAL "") ...@@ -168,7 +168,7 @@ IF ("${BUILD_TOOLS}" STREQUAL "")
ELSEIF (TD_ARM_64) ELSEIF (TD_ARM_64)
SET(BUILD_TOOLS "false") SET(BUILD_TOOLS "false")
ELSE () ELSE ()
SET(BUILD_TOOLS "true") SET(BUILD_TOOLS "false")
ENDIF () ENDIF ()
ELSEIF (TD_DARWIN) ELSEIF (TD_DARWIN)
SET(BUILD_TOOLS "false") SET(BUILD_TOOLS "false")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册