Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f5d0c3cf
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看板
提交
f5d0c3cf
编写于
10月 25, 2021
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-10750]remove default checkout in jenkins
上级
909d68ec
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
58 addition
and
42 deletion
+58
-42
Jenkinsfile
Jenkinsfile
+58
-42
未找到文件。
Jenkinsfile
浏览文件 @
f5d0c3cf
import
hudson.model.Result
import
hudson.model.Result
import
hudson.model.*
;
import
hudson.model.*
;
import
jenkins.model.CauseOfInterruption
import
jenkins.model.CauseOfInterruption
properties
([
pipelineTriggers
([
githubPush
()])])
node
{
node
{
git
url:
'https://github.com/taosdata/TDengine.git'
}
}
def
skipbuild
=
0
def
skipbuild
=
0
...
@@ -72,6 +70,7 @@ def pre_test(){
...
@@ -72,6 +70,7 @@ def pre_test(){
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 clean -dfx
git clean -dfx
git submodule update --init --recursive
cd ${WK}
cd ${WK}
git reset --hard HEAD~10
git reset --hard HEAD~10
'''
'''
...
@@ -114,6 +113,7 @@ def pre_test(){
...
@@ -114,6 +113,7 @@ def pre_test(){
}
}
def
pre_test_win
(){
def
pre_test_win
(){
bat
'''
bat
'''
taskkill /f /t /im python.exe
cd C:\\
cd C:\\
rd /s /Q C:\\TDengine
rd /s /Q C:\\TDengine
cd C:\\workspace\\TDinternal
cd C:\\workspace\\TDinternal
...
@@ -147,6 +147,7 @@ def pre_test_win(){
...
@@ -147,6 +147,7 @@ def pre_test_win(){
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 clean -dfx
git clean -dfx
git submodule update --init --recursive
cd C:\\workspace\\TDinternal
cd C:\\workspace\\TDinternal
git reset --hard HEAD~10
git reset --hard HEAD~10
'''
'''
...
@@ -171,7 +172,6 @@ def pre_test_win(){
...
@@ -171,7 +172,6 @@ def pre_test_win(){
}
}
}
}
bat
'''
bat
'''
taskkill /f /t /im python.exe
cd C:\\workspace\\TDinternal
cd C:\\workspace\\TDinternal
git pull
git pull
...
@@ -192,6 +192,7 @@ def pre_test_win(){
...
@@ -192,6 +192,7 @@ def pre_test_win(){
}
}
pipeline
{
pipeline
{
agent
none
agent
none
options
{
skipDefaultCheckout
()
}
environment
{
environment
{
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'
...
@@ -199,6 +200,7 @@ pipeline {
...
@@ -199,6 +200,7 @@ pipeline {
stages
{
stages
{
stage
(
'pre_build'
){
stage
(
'pre_build'
){
agent
{
label
'master'
}
agent
{
label
'master'
}
options
{
skipDefaultCheckout
()
}
when
{
when
{
changeRequest
()
changeRequest
()
}
}
...
@@ -207,52 +209,52 @@ pipeline {
...
@@ -207,52 +209,52 @@ pipeline {
abort_previous
()
abort_previous
()
abortPreviousBuilds
()
abortPreviousBuilds
()
}
}
sh
'''
//
sh'''
rm -rf ${WORKSPACE}.tes
//
rm -rf ${WORKSPACE}.tes
cp -r ${WORKSPACE} ${WORKSPACE}.tes
//
cp -r ${WORKSPACE} ${WORKSPACE}.tes
cd ${WORKSPACE}.tes
//
cd ${WORKSPACE}.tes
git fetch
//
git fetch
'''
//
'''
script
{
//
script {
if
(
env
.
CHANGE_TARGET
==
'master'
)
{
//
if (env.CHANGE_TARGET == 'master') {
sh
'''
//
sh '''
git checkout master
//
git checkout master
'''
//
'''
}
//
}
else
if
(
env
.
CHANGE_TARGET
==
'2.0'
){
//
else if(env.CHANGE_TARGET == '2.0'){
sh
'''
//
sh '''
git checkout 2.0
//
git checkout 2.0
'''
//
'''
}
//
}
else
{
//
else{
sh
'''
//
sh '''
git checkout develop
//
git checkout develop
'''
//
'''
}
//
}
}
//
}
sh
'''
//
sh'''
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
'''
//
'''
script
{
// script{
skipbuild
=
'2'
// skipbuild='2'
skipbuild
=
sh
(
script:
"git log -2 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]' && echo 1 || echo 2"
,
returnStdout:
true
)
// skipbuild=sh(script: "git log -2 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]' && echo 1 || echo 2", returnStdout:true)
println
skipbuild
// println skipbuild
}
// }
sh
'''
// sh'''
rm -rf ${WORKSPACE}.tes
// rm -rf ${WORKSPACE}.tes
'''
// '''
// }
}
}
}
}
stage
(
'Parallel test stage'
)
{
stage
(
'Parallel test stage'
)
{
//only build pr
//only build pr
options
{
skipDefaultCheckout
()
}
when
{
when
{
allOf
{
allOf
{
changeRequest
()
changeRequest
()
expression
{
not
{
expression
{
env
.
CHANGE_BRANCH
=~
/docs\//
}}
return
skipbuild
.
trim
()
==
'2'
}
}
}
}
}
parallel
{
parallel
{
...
@@ -313,11 +315,25 @@ pipeline {
...
@@ -313,11 +315,25 @@ pipeline {
cd ${WKC}/tests/examples/nodejs
cd ${WKC}/tests/examples/nodejs
npm install td2.0-connector > /dev/null 2>&1
npm install td2.0-connector > /dev/null 2>&1
node nodejsChecker.js host=localhost
node nodejsChecker.js host=localhost
node test1970.js
cd ${WKC}/tests/connectorTest/nodejsTest/nanosupport
npm install td2.0-connector > /dev/null 2>&1
node nanosecondTest.js
'''
sh
'''
cd ${WKC}/src/connector/node-rest/
npm install
npm run build
npm run build:test
npm run test
'''
'''
sh
'''
sh
'''
cd ${WKC}/tests/examples/C#/taosdemo
cd ${WKC}/tests/examples/C#/taosdemo
mcs -out:taosdemo *.cs > /dev/null 2>&1
mcs -out:taosdemo *.cs > /dev/null 2>&1
./taosdemo -c /etc/taos -y
echo '' |./taosdemo -c /etc/taos
cd ${WKC}/tests/connectorTest/C#Test/nanosupport
mcs -out:nano *.cs > /dev/null 2>&1
echo '' |./nano
'''
'''
sh
'''
sh
'''
cd ${WKC}/tests/gotest
cd ${WKC}/tests/gotest
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录