Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
13c9aa55
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
13c9aa55
编写于
2月 08, 2022
作者:
Y
Yiqing Liu
提交者:
GitHub
2月 08, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10129 from taosdata/test/newCI_3.0
[TD-13398]<CI> move 3.0 CI job
上级
b18995c4
8b9430a4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
200 addition
and
0 deletion
+200
-0
tests/parallel_test/Jenkinsfile
tests/parallel_test/Jenkinsfile
+200
-0
未找到文件。
tests/parallel_test/Jenkinsfile
0 → 100644
浏览文件 @
13c9aa55
import
hudson.model.Result
import
hudson.model.*
;
import
jenkins.model.CauseOfInterruption
node
{
}
def
skipbuild
=
0
def
win_stop
=
0
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()
}
}
// abort previous build
abortPreviousBuilds
()
def
abort_previous
(){
def
buildNumber
=
env
.
BUILD_NUMBER
as
int
if
(
buildNumber
>
1
)
milestone
(
buildNumber
-
1
)
milestone
(
buildNumber
)
}
def
pre_test
(){
sh
'hostname'
sh
'''
sudo rmtaos || echo "taosd has not installed"
'''
sh
'''
killall -9 taosd ||echo "no taosd running"
killall -9 gdb || echo "no gdb running"
killall -9 python3.8 || echo "no python program running"
cd ${WKC}
'''
script
{
if
(
env
.
CHANGE_TARGET
==
'master'
)
{
sh
'''
cd ${WKC}
git checkout master
'''
}
else
if
(
env
.
CHANGE_TARGET
==
'2.0'
){
sh
'''
cd ${WKC}
git checkout 2.0
'''
}
else
if
(
env
.
CHANGE_TARGET
==
'3.0'
){
sh
'''
cd ${WKC}
git checkout 3.0
'''
}
else
{
sh
'''
cd ${WKC}
git checkout develop
'''
}
}
sh
'''
cd ${WKC}
git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD
export TZ=Asia/Harbin
date
rm -rf debug
mkdir debug
cd debug
cmake .. > /dev/null
make -j4> /dev/null
'''
return
1
}
pipeline
{
agent
none
options
{
skipDefaultCheckout
()
}
environment
{
WK
=
'/var/lib/jenkins/workspace/TDinternal'
WKC
=
'/var/lib/jenkins/workspace/TDengine'
}
stages
{
stage
(
'pre_build'
){
agent
{
label
'slave3_0'
}
options
{
skipDefaultCheckout
()
}
when
{
changeRequest
()
}
steps
{
script
{
abort_previous
()
abortPreviousBuilds
()
}
timeout
(
time:
45
,
unit:
'MINUTES'
){
pre_test
()
sh
'''
cd ${WKC}/tests
./test-all.sh b1fq
'''
sh
'''
cd ${WKC}/debug
ctest
'''
}
}
}
}
post
{
success
{
emailext
(
subject:
"PR-result: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' SUCCESS"
,
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>构建名称>>分支:${env.BRANCH_NAME}</li>
<li>构建结果:<span style="color:green"> Successful </span></li>
<li>构建编号:${BUILD_NUMBER}</li>
<li>触发用户:${env.CHANGE_AUTHOR}</li>
<li>提交信息:${env.CHANGE_TITLE}</li>
<li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li>
<li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li>
</div>
</ul>
</td>
</tr>
</table></font>
</body>
</html>"""
,
to:
"${env.CHANGE_AUTHOR_EMAIL}"
,
from:
"support@taosdata.com"
)
}
failure
{
emailext
(
subject:
"PR-result: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' FAIL"
,
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>构建名称>>分支:${env.BRANCH_NAME}</li>
<li>构建结果:<span style="color:red"> Failure </span></li>
<li>构建编号:${BUILD_NUMBER}</li>
<li>触发用户:${env.CHANGE_AUTHOR}</li>
<li>提交信息:${env.CHANGE_TITLE}</li>
<li>构建地址:<a href=${BUILD_URL}>${BUILD_URL}</a></li>
<li>构建日志:<a href=${BUILD_URL}console>${BUILD_URL}console</a></li>
</div>
</ul>
</td>
</tr>
</table></font>
</body>
</html>"""
,
to:
"${env.CHANGE_AUTHOR_EMAIL}"
,
from:
"support@taosdata.com"
)
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录