Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
04bbc0bf
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看板
提交
04bbc0bf
编写于
2月 12, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-11818] merge 3.0
上级
c48fd111
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
233 addition
and
0 deletion
+233
-0
CMakeLists.txt
CMakeLists.txt
+1
-0
Jenkinsfile2
Jenkinsfile2
+232
-0
未找到文件。
CMakeLists.txt
浏览文件 @
04bbc0bf
...
...
@@ -28,6 +28,7 @@ endif(${BUILD_TEST})
add_subdirectory
(
source
)
add_subdirectory
(
tools
)
add_subdirectory
(
tests
)
add_subdirectory
(
example
)
# docs
add_subdirectory
(
docs
)
...
...
Jenkinsfile2
0 → 100644
浏览文件 @
04bbc0bf
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
git submodule update --init --recursive --remote
'''
script {
if (env.CHANGE_TARGET == 'master') {
sh '''
cd ${WKCT}
git checkout master
'''
}
else if(env.CHANGE_TARGET == '2.0'){
sh '''
cd ${WKCT}
git checkout 2.0
'''
}
else if(env.CHANGE_TARGET == '3.0'){
sh '''
cd ${WKCT}
git checkout 3.0
'''
}
else{
sh '''
cd ${WKCT}
git checkout develop
'''
}
}
sh'''
cd ${WKCT}
git pull >/dev/null
cd ${WKC}
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'
WKCT= '/var/lib/jenkins/workspace/TDengine/tests'
}
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录