Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e956ecee
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e956ecee
编写于
6月 20, 2022
作者:
T
tangfangzhi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ci: split the ci environment into two
上级
b148fbcd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
42 addition
and
76 deletion
+42
-76
Jenkinsfile2
Jenkinsfile2
+42
-76
未找到文件。
Jenkinsfile2
浏览文件 @
e956ecee
...
@@ -7,7 +7,8 @@ def sync_source() {
...
@@ -7,7 +7,8 @@ def sync_source() {
sh '''
sh '''
hostname
hostname
date
date
'''
env
'''
sh '''
sh '''
cd ${WKC}
cd ${WKC}
[ -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"
...
@@ -36,6 +37,12 @@ def sync_source() {
...
@@ -36,6 +37,12 @@ def sync_source() {
git clean -fxd
git clean -fxd
git checkout 2.4
git checkout 2.4
'''
'''
} else if (env.CHANGE_TARGET == '2.6') {
sh '''
cd ${WKC}
git clean -fxd
git checkout 2.6
'''
} else {
} else {
sh '''
sh '''
cd ${WKC}
cd ${WKC}
...
@@ -51,6 +58,7 @@ def sync_source() {
...
@@ -51,6 +58,7 @@ def sync_source() {
[ -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 clean -dfx
git clean -dfx
git log -5
'''
'''
script {
script {
if (env.CHANGE_TARGET == 'master') {
if (env.CHANGE_TARGET == 'master') {
...
@@ -68,6 +76,11 @@ def sync_source() {
...
@@ -68,6 +76,11 @@ def sync_source() {
cd ${WK}
cd ${WK}
git checkout 2.4
git checkout 2.4
'''
'''
} else if (env.CHANGE_TARGET == '2.6') {
sh '''
cd ${WK}
git checkout 2.6
'''
} else {
} else {
sh '''
sh '''
cd ${WK}
cd ${WK}
...
@@ -79,6 +92,7 @@ def sync_source() {
...
@@ -79,6 +92,7 @@ def sync_source() {
cd ${WK}
cd ${WK}
git pull >/dev/null
git pull >/dev/null
git clean -dfx
git clean -dfx
git log -5
'''
'''
script {
script {
if (env.CHANGE_URL =~ /\/TDengine\//) {
if (env.CHANGE_URL =~ /\/TDengine\//) {
...
@@ -87,7 +101,10 @@ def sync_source() {
...
@@ -87,7 +101,10 @@ def sync_source() {
cd ${WKC}
cd ${WKC}
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
git log -5
'''
sh '''
cd ${WKC}
if [ ! -d src/connector/python/.github ]; then
if [ ! -d src/connector/python/.github ]; then
rm -rf src/connector/python/* || :
rm -rf src/connector/python/* || :
rm -rf src/connector/python/.* || :
rm -rf src/connector/python/.* || :
...
@@ -95,7 +112,6 @@ def sync_source() {
...
@@ -95,7 +112,6 @@ def sync_source() {
else
else
cd src/connector/python || echo "src/connector/python not exist"
cd src/connector/python || echo "src/connector/python not exist"
git pull || :
git pull || :
cd ${WKC}
fi
fi
'''
'''
} else if (env.CHANGE_URL =~ /\/TDinternal\//) {
} else if (env.CHANGE_URL =~ /\/TDinternal\//) {
...
@@ -104,7 +120,10 @@ def sync_source() {
...
@@ -104,7 +120,10 @@ def sync_source() {
cd ${WK}
cd ${WK}
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
git log -5
'''
sh '''
cd ${WKC}
if [ ! -d community/src/connector/python/.github ]; then
if [ ! -d community/src/connector/python/.github ]; then
rm -rf community/src/connector/python/* || :
rm -rf community/src/connector/python/* || :
rm -rf community/src/connector/python/.* || :
rm -rf community/src/connector/python/.* || :
...
@@ -112,7 +131,6 @@ def sync_source() {
...
@@ -112,7 +131,6 @@ def sync_source() {
else
else
cd community/src/connector/python || echo "community/src/connector/python not exist"
cd community/src/connector/python || echo "community/src/connector/python not exist"
git pull || :
git pull || :
cd ${WK}
fi
fi
'''
'''
} else {
} else {
...
@@ -153,7 +171,7 @@ def pre_test_mac() {
...
@@ -153,7 +171,7 @@ def pre_test_mac() {
return 1
return 1
}
}
pipeline {
pipeline {
agent
{label " dispatcher "}
agent
none
options { skipDefaultCheckout() }
options { skipDefaultCheckout() }
environment{
environment{
WK = '/var/data/jenkins/workspace/TDinternal'
WK = '/var/data/jenkins/workspace/TDinternal'
...
@@ -161,69 +179,6 @@ pipeline {
...
@@ -161,69 +179,6 @@ pipeline {
LOGDIR = '/var/data/jenkins/workspace/log'
LOGDIR = '/var/data/jenkins/workspace/log'
}
}
stages {
stages {
stage ('pre_build') {
steps {
sh '''
date
pwd
env
hostname
'''
}
}
stage ('Parallel build stage') {
//only build pr
options { skipDefaultCheckout() }
when {
allOf {
changeRequest()
not { expression { env.CHANGE_BRANCH =~ /docs\// }}
}
}
parallel {
stage ('dispatcher sync source') {
steps {
timeout(time: 20, unit: 'MINUTES') {
sync_source()
script {
sh '''
echo "dispatcher ready"
date
'''
}
}
}
}
stage ('build worker01') {
agent {label " worker01 "}
steps {
timeout(time: 20, unit: 'MINUTES') {
pre_test()
script {
sh '''
echo "worker01 build done"
date
'''
}
}
}
}
stage ('build worker02') {
agent {label " worker02 "}
steps {
timeout(time: 20, unit: 'MINUTES') {
pre_test()
script {
sh '''
echo "worker02 build done"
date
'''
}
}
}
}
}
}
stage('run test') {
stage('run test') {
options { skipDefaultCheckout() }
options { skipDefaultCheckout() }
when {
when {
...
@@ -233,28 +188,28 @@ pipeline {
...
@@ -233,28 +188,28 @@ pipeline {
}
}
}
}
parallel {
parallel {
stage ('build
worker07_
arm64') {
stage ('build arm64') {
agent {label " worker07_arm64 "}
agent {label " worker07_arm64
|| worker09_arm64
"}
steps {
steps {
timeout(time: 20, unit: 'MINUTES') {
timeout(time: 20, unit: 'MINUTES') {
pre_test()
pre_test()
script {
script {
sh '''
sh '''
echo "
worker07_
arm64 build done"
echo "arm64 build done"
date
date
'''
'''
}
}
}
}
}
}
}
}
stage ('build Mac
_catalina
') {
stage ('build Mac') {
agent {label " Mac_catalina "}
agent {label " Mac_catalina "}
steps {
steps {
timeout(time: 20, unit: 'MINUTES') {
timeout(time: 20, unit: 'MINUTES') {
pre_test_mac()
pre_test_mac()
script {
script {
sh '''
sh '''
echo "Mac
_catalina
build done"
echo "Mac build done"
date
date
'''
'''
}
}
...
@@ -262,17 +217,28 @@ pipeline {
...
@@ -262,17 +217,28 @@ pipeline {
}
}
}
}
stage('run cases') {
stage('run cases') {
agent {label " worker01 || worker02 "}
steps {
steps {
sh '''
sh '''
date
date
pwd
hostname
hostname
'''
'''
timeout(time: 15, unit: 'MINUTES') {
pre_test()
script {
sh '''
echo "Linux build done"
date
'''
}
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
timeout(time: 2
1
, unit: 'MINUTES') {
timeout(time: 2
5
, unit: 'MINUTES') {
sh '''
sh '''
date
date
cd ${WKC}/tests/parallel_test
cd ${WKC}/tests/parallel_test
time
out 1200 time ./run.sh -m
m.json -t cases.task -l ${LOGDIR} -b ${BRANCH_NAME}
time
./run.sh -m /home/
m.json -t cases.task -l ${LOGDIR} -b ${BRANCH_NAME}
date
date
hostname
hostname
'''
'''
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录