Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Tonvia
TDengine
提交
2cc2a9cd
T
TDengine
项目概览
Tonvia
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2cc2a9cd
编写于
12月 15, 2020
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<test>fix jenkins error
上级
8e2c3ed3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
64 addition
and
184 deletion
+64
-184
tests/Jenkinsfile
tests/Jenkinsfile
+64
-184
未找到文件。
tests/Jenkinsfile
浏览文件 @
2cc2a9cd
import
hudson.model.Result
import
jenkins.model.CauseOfInterruption
properties
([
pipelineTriggers
([
githubPush
()])])
node
{
git
url:
'https://github.com/taosdata/TDengine.git'
}
def
abortPreviousBuilds
()
{
def
currentJobName
=
env
.
JOB_NAME
def
currentBuildNumber
=
env
.
BUILD_NUMBER
.
toInteger
()
def
jobs
=
Jenkins
.
instance
.
getItemByFullName
(
currentJobName
)
def
builds
=
jobs
.
getBuilds
()
for
(
build
in
builds
)
{
if
(!
build
.
isBuilding
())
{
continue
;
}
if
(
currentBuildNumber
==
build
.
getNumber
().
toInteger
())
{
continue
;
}
build
.
doKill
()
//doTerm(),doKill(),doTerm()
}
}
//停止之前相同的分支。。
abortPreviousBuilds
()
def
pre_test
(){
def
pre_test
(){
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
sh
'''
sh
'''
...
@@ -5,15 +34,17 @@ def pre_test(){
...
@@ -5,15 +34,17 @@ def pre_test(){
'''
'''
}
}
sh
'''
sh
'''
cd ${WKC}
cd ${WKC}
git reset --hard
rm -rf *
git checkout ${BRANCH}
git pull
git submodule update
cd ${WK}
cd ${WK}
git reset --hard
git reset --hard
git checkout
${BRANCH}
git checkout
develop
git pull
git pull
cd ${WKC}
rm -rf *
mv ${WORKSPACE}/* .
cd ${WK}
export TZ=Asia/Harbin
export TZ=Asia/Harbin
date
date
rm -rf ${WK}/debug
rm -rf ${WK}/debug
...
@@ -22,23 +53,30 @@ def pre_test(){
...
@@ -22,23 +53,30 @@ def pre_test(){
cmake .. > /dev/null
cmake .. > /dev/null
make > /dev/null
make > /dev/null
make install > /dev/null
make install > /dev/null
cd ${WKC}/tests
'''
'''
return
1
return
1
}
}
pipeline
{
pipeline
{
agent
none
agent
none
environment
{
environment
{
BRANCH
=
'develop'
WK
=
'/var/lib/jenkins/workspace/TDinternal'
WK
=
'/var/lib/jenkins/workspace/TDinternal'
WKC
=
'/var/lib/jenkins/workspace/TDinternal/community'
WKC
=
'/var/lib/jenkins/workspace/TDinternal/community'
}
}
stages
{
stages
{
stage
(
'Parallel test stage'
)
{
stage
(
'Parallel test stage'
)
{
//only pr triggering the build.
when
{
changeRequest
()
}
parallel
{
parallel
{
stage
(
'pyt
est'
)
{
stage
(
'pyt
hon'
)
{
agent
{
label
'
184
'
}
agent
{
label
'
pytest
'
}
steps
{
steps
{
pre_test
()
pre_test
()
sh
'''
sh
'''
cd ${WKC}/tests
cd ${WKC}/tests
...
@@ -47,15 +85,9 @@ pipeline {
...
@@ -47,15 +85,9 @@ pipeline {
}
}
}
}
stage
(
'test_b1'
)
{
stage
(
'test_b1'
)
{
agent
{
label
'
master
'
}
agent
{
label
'
b1
'
}
steps
{
steps
{
pre_test
()
pre_test
()
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
sh
'''
cd ${WKC}/tests/pytest
python3 concurrent_inquiry.py -c 1
'''
}
sh
'''
sh
'''
cd ${WKC}/tests
cd ${WKC}/tests
./test-all.sh b1
./test-all.sh b1
...
@@ -64,12 +96,9 @@ pipeline {
...
@@ -64,12 +96,9 @@ pipeline {
}
}
stage
(
'test_crash_gen'
)
{
stage
(
'test_crash_gen'
)
{
agent
{
label
"
185
"
}
agent
{
label
"
b2
"
}
steps
{
steps
{
pre_test
()
pre_test
()
sh
'''
cd ${WKC}/tests/pytest
'''
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
sh
'''
sh
'''
cd ${WKC}/tests/pytest
cd ${WKC}/tests/pytest
...
@@ -83,6 +112,7 @@ pipeline {
...
@@ -83,6 +112,7 @@ pipeline {
'''
'''
}
}
sh
'''
sh
'''
date
cd ${WKC}/tests
cd ${WKC}/tests
./test-all.sh b2
./test-all.sh b2
date
date
...
@@ -91,177 +121,27 @@ pipeline {
...
@@ -91,177 +121,27 @@ pipeline {
}
}
stage
(
'test_valgrind'
)
{
stage
(
'test_valgrind'
)
{
agent
{
label
"
186
"
}
agent
{
label
"
b3
"
}
steps
{
steps
{
pre_test
()
pre_test
()
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
sh
'''
cd ${WKC}/tests/pytest
./valgrind-test.sh 2>&1 > mem-error-out.log
./handle_val_log.sh
'''
}
sh
'''
sh
'''
cd ${WKC}/tests/pytest
./valgrind-test.sh 2>&1 > mem-error-out.log
./handle_val_log.sh
date
date
cd ${WKC}/tests
cd ${WKC}/tests
./test-all.sh b3
./test-all.sh b3
date'''
date'''
}
}
}
}
stage
(
'connector'
){
agent
{
label
"release"
}
steps
{
sh
'''
cd ${WORKSPACE}
git checkout develop
'''
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
sh
'''
cd ${WORKSPACE}/tests/gotest
bash batchtest.sh
'''
}
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
sh
'''
cd ${WORKSPACE}/tests/examples/python/PYTHONConnectorChecker
python3 PythonChecker.py
'''
}
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
sh
'''
cd ${WORKSPACE}/tests/examples/JDBC/JDBCDemo/
mvn clean package assembly:single >/dev/null
java -jar target/jdbcChecker-SNAPSHOT-jar-with-dependencies.jar -host 127.0.0.1
'''
}
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
sh
'''
cd ${JENKINS_HOME}/workspace/C#NET/src/CheckC#
dotnet run
'''
}
}
}
stage
(
'arm64_build'
){
agent
{
label
'arm64'
}
steps
{
sh
'''
cd ${WK}
git fetch
git checkout develop
git pull
cd ${WKC}
git fetch
git checkout develop
git pull
git submodule update
cd ${WKC}/packaging
./release.sh -v cluster -c aarch64 -n 2.0.0.0 -m 2.0.0.0
'''
}
}
stage
(
'arm32_build'
){
agent
{
label
'arm32'
}
steps
{
catchError
(
buildResult:
'SUCCESS'
,
stageResult:
'FAILURE'
)
{
sh
'''
cd ${WK}
git fetch
git checkout develop
git pull
cd ${WKC}
git fetch
git checkout develop
git pull
git submodule update
cd ${WKC}/packaging
./release.sh -v cluster -c aarch32 -n 2.0.0.0 -m 2.0.0.0
'''
}
}
}
}
}
}
}
}
post
{
}
success
{
emailext
(
}
subject:
"SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'"
,
body:
'''<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4" offset="0">
<table width="95%" cellpadding="0" cellspacing="0" style="font-size: 16pt; font-family: Tahoma, Arial, Helvetica, sans-serif">
<tr>
<td><br />
<b><font color="#0B610B"><font size="6">构建信息</font></font></b>
<hr size="2" width="100%" align="center" /></td>
</tr>
<tr>
<td>
<ul>
<div style="font-size:18px">
<li>构建名称>>分支:${PROJECT_NAME}</li>
<li>构建结果:<span style="color:green"> Successful </span></li>
<li>构建编号:${BUILD_NUMBER}</li>
<li>触发用户:${CAUSE}</li>
<li>变更概要:${CHANGES}</li>
<li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li>
<li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li>
<li>变更集:${JELLY_SCRIPT}</li>
</div>
</ul>
</td>
</tr>
</table></font>
</body>
</html>'''
,
to:
"yqliu@taosdata.com,pxiao@taosdata.com"
,
from:
"support@taosdata.com"
)
}
failure
{
emailext
(
subject:
"FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'"
,
body:
'''<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4" offset="0">
<table width="95%" cellpadding="0" cellspacing="0" style="font-size: 16pt; font-family: Tahoma, Arial, Helvetica, sans-serif">
<tr>
<td><br />
<b><font color="#0B610B"><font size="6">构建信息</font></font></b>
<hr size="2" width="100%" align="center" /></td>
</tr>
<tr>
<td>
<ul>
<div style="font-size:18px">
<li>构建名称>>分支:${PROJECT_NAME}</li>
<li>构建结果:<span style="color:green"> Successful </span></li>
<li>构建编号:${BUILD_NUMBER}</li>
<li>触发用户:${CAUSE}</li>
<li>变更概要:${CHANGES}</li>
<li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li>
<li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li>
<li>变更集:${JELLY_SCRIPT}</li>
</div>
</ul>
</td>
</tr>
</table></font>
</body>
</html>'''
,
to:
"yqliu@taosdata.com,pxiao@taosdata.com"
,
from:
"support@taosdata.com"
)
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录