Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
3d3f40ba
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3d3f40ba
编写于
7月 14, 2019
作者:
Q
quicksilver
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS-215 - add milvus cluster CI/CD groovy file
Former-commit-id: 2a9700bea196d578d4e3250fda0f162064fccd8d
上级
fe99a044
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
484 addition
and
551 deletion
+484
-551
ci/jenkinsfile/cleanup_dev.groovy
ci/jenkinsfile/cleanup_dev.groovy
+7
-8
ci/jenkinsfile/cluster_cleanup_dev.groovy
ci/jenkinsfile/cluster_cleanup_dev.groovy
+7
-8
ci/jenkinsfile/cluster_deploy2dev.groovy
ci/jenkinsfile/cluster_deploy2dev.groovy
+5
-4
ci/jenkinsfile/cluster_dev_test.groovy
ci/jenkinsfile/cluster_dev_test.groovy
+9
-15
ci/jenkinsfile/deploy2dev.groovy
ci/jenkinsfile/deploy2dev.groovy
+11
-5
ci/jenkinsfile/dev_test.groovy
ci/jenkinsfile/dev_test.groovy
+9
-15
ci/jenkinsfile/upload_dev_cluster_test_out.groovy
ci/jenkinsfile/upload_dev_cluster_test_out.groovy
+10
-22
ci/jenkinsfile/upload_dev_test_out.groovy
ci/jenkinsfile/upload_dev_test_out.groovy
+9
-22
ci/main_jenkinsfile
ci/main_jenkinsfile
+143
-154
ci/main_jenkinsfile_no_ut
ci/main_jenkinsfile_no_ut
+143
-154
ci/nightly_main_jenkinsfile
ci/nightly_main_jenkinsfile
+131
-144
未找到文件。
ci/jenkinsfile/cleanup_dev.groovy
浏览文件 @
3d3f40ba
try
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
if
(
currentBuild
.
result
==
'ABORTED'
)
{
throw
new
hudson
.
AbortException
(
"Dev Test Aborted !"
)
}
else
if
(
currentBuild
.
result
==
'FAILURE'
)
{
error
(
"Dev Test Failure !"
)
def
result
=
sh
script:
"helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}"
,
returnStatus:
true
if
(!
result
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
}
}
catch
(
exc
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
updateGitlabCommitStatus
name:
'Cleanup Dev'
,
state:
'failed'
def
result
=
sh
script:
"helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}"
,
returnStatus:
true
if
(!
result
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
}
throw
exc
}
ci/jenkinsfile/cluster_cleanup_dev.groovy
浏览文件 @
3d3f40ba
try
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
if
(
currentBuild
.
result
==
'ABORTED'
)
{
throw
new
hudson
.
AbortException
(
"Cluster Dev Test Aborted !"
)
}
else
if
(
currentBuild
.
result
==
'FAILURE'
)
{
error
(
"Dev Test Failure !"
)
def
result
=
sh
script:
"helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
,
returnStatus:
true
if
(!
result
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
}
}
catch
(
exc
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
updateGitlabCommitStatus
name:
'Cleanup Dev'
,
state:
'failed'
def
result
=
sh
script:
"helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
,
returnStatus:
true
if
(!
result
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
}
throw
exc
}
ci/jenkinsfile/cluster_deploy2dev.groovy
浏览文件 @
3d3f40ba
...
...
@@ -3,17 +3,18 @@ try {
sh
'helm repo add milvus https://registry.zilliz.com/chartrepo/milvus'
sh
'helm repo update'
dir
(
"milvus-helm"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[
[
$class
:
'SubmoduleOption'
,
disableSubmodules:
false
,
parentCredentials:
true
,
recursiveSubmodules:
true
,
reference:
''
,
trackingSubmodules:
false
]
],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:megasearch/milvus-helm.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:megasearch/milvus-helm.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
dir
(
"milvus/milvus-cluster"
)
{
sh
"helm install --set roServers.image.tag=${DOCKER_VERSION} --set woServers.image.tag=${DOCKER_VERSION} --set expose.type=clusterIP -f ci/values.yaml --name ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster --namespace milvus-cluster --version 0.
1.0
. "
sh
"helm install --set roServers.image.tag=${DOCKER_VERSION} --set woServers.image.tag=${DOCKER_VERSION} --set expose.type=clusterIP -f ci/values.yaml --name ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster --namespace milvus-cluster --version 0.
3.1
. "
}
}
timeout
(
time:
2
,
unit:
'MINUTES'
)
{
waitUntil
{
def
result
=
sh
script:
"nc -z -w
2
${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster-milvus-cluster-proxy.milvus-cluster.svc.cluster.local 19530"
,
returnStatus:
true
def
result
=
sh
script:
"nc -z -w
3
${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster-milvus-cluster-proxy.milvus-cluster.svc.cluster.local 19530"
,
returnStatus:
true
return
!
result
}
}
}
catch
(
exc
)
{
updateGitlabCommitStatus
name:
'Deloy to Dev'
,
state:
'failed'
echo
'Helm running failed!'
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
throw
exc
...
...
ci/jenkinsfile/cluster_dev_test.groovy
浏览文件 @
3d3f40ba
container
(
'milvus-testframework'
)
{
timeout
(
time:
10
,
unit:
'MINUTES'
)
{
gitlabCommitStatus
(
name:
'Dev Test'
)
{
try
{
dir
(
"${PROJECT_NAME}_test"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:Test/milvus_test.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
sh
'python3 -m pip install -r requirements.txt'
sh
"pytest . --alluredir=cluster_test_out --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster-milvus-cluster-proxy.milvus-cluster.svc.cluster.local"
}
}
catch
(
exc
)
{
updateGitlabCommitStatus
name:
'Dev Test'
,
state:
'failed'
currentBuild
.
result
=
'FAILURE'
echo
'Milvus Test Failed !'
}
timeout
(
time:
10
,
unit:
'MINUTES'
)
{
try
{
dir
(
"${PROJECT_NAME}_test"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:Test/milvus_test.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
sh
'python3 -m pip install -r requirements.txt'
sh
"pytest . --alluredir=cluster_test_out --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster-milvus-cluster-proxy.milvus-cluster.svc.cluster.local"
}
}
catch
(
exc
)
{
echo
'Milvus Test Failed !'
throw
exc
}
}
ci/jenkinsfile/deploy2dev.groovy
浏览文件 @
3d3f40ba
...
...
@@ -2,13 +2,19 @@ try {
sh
'helm init --client-only --skip-refresh --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts'
sh
'helm repo add milvus https://registry.zilliz.com/chartrepo/milvus'
sh
'helm repo update'
sh
"helm install --set engine.image.tag=${DOCKER_VERSION} --set expose.type=clusterIP --name ${env.JOB_NAME}-${env.BUILD_NUMBER} --version 0.3.0 milvus/milvus-gpu"
waitUntil
{
def
result
=
sh
script:
"nc -z -w 2 ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine.kube-opt.svc.cluster.local 19530"
,
returnStatus:
true
return
!
result
dir
(
"milvus-helm"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:megasearch/milvus-helm.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
dir
(
"milvus/milvus-gpu"
)
{
sh
"helm install --set engine.image.tag=${DOCKER_VERSION} --set expose.type=clusterIP --name ${env.JOB_NAME}-${env.BUILD_NUMBER} --version 0.3.1 ."
}
}
timeout
(
time:
2
,
unit:
'MINUTES'
)
{
waitUntil
{
def
result
=
sh
script:
"nc -z -w 3 ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine.kube-opt.svc.cluster.local 19530"
,
returnStatus:
true
return
!
result
}
}
}
catch
(
exc
)
{
updateGitlabCommitStatus
name:
'Deloy to Dev'
,
state:
'failed'
echo
'Helm running failed!'
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
throw
exc
...
...
ci/jenkinsfile/dev_test.groovy
浏览文件 @
3d3f40ba
container
(
'milvus-testframework'
)
{
timeout
(
time:
10
,
unit:
'MINUTES'
)
{
gitlabCommitStatus
(
name:
'Dev Test'
)
{
try
{
dir
(
"${PROJECT_NAME}_test"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:Test/milvus_test.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
sh
'python3 -m pip install -r requirements.txt'
sh
"pytest . --alluredir=test_out --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine.kube-opt.svc.cluster.local"
}
}
catch
(
exc
)
{
updateGitlabCommitStatus
name:
'Dev Test'
,
state:
'failed'
currentBuild
.
result
=
'FAILURE'
echo
'Milvus Test Failed !'
}
timeout
(
time:
10
,
unit:
'MINUTES'
)
{
try
{
dir
(
"${PROJECT_NAME}_test"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:Test/milvus_test.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
sh
'python3 -m pip install -r requirements.txt'
sh
"pytest . --alluredir=test_out --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine.kube-opt.svc.cluster.local"
}
}
catch
(
exc
)
{
echo
'Milvus Test Failed !'
throw
exc
}
}
ci/jenkinsfile/upload_dev_cluster_test_out.groovy
浏览文件 @
3d3f40ba
container
(
'milvus-testframework'
)
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
gitlabCommitStatus
(
name:
'Upload Dev Test Out'
)
{
if
(
fileExists
(
'cluster_test_out'
))
{
try
{
def
fileTransfer
=
load
"${env.WORKSPACE}/ci/function/file_transfer.groovy"
fileTransfer
.
FileTransfer
(
"cluster_test_out/"
,
"${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}"
,
'nas storage'
)
if
(
currentBuild
.
resultIsBetterOrEqualTo
(
'SUCCESS'
))
{
echo
"Milvus Dev Test Out Viewer \"ftp://192.168.1.126/data/${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}\""
}
}
catch
(
hudson
.
AbortException
ae
)
{
updateGitlabCommitStatus
name:
'Upload Dev Test Out'
,
state:
'canceled'
currentBuild
.
result
=
'ABORTED'
}
catch
(
exc
)
{
updateGitlabCommitStatus
name:
'Upload Dev Test Out'
,
state:
'failed'
currentBuild
.
result
=
'FAILURE'
}
}
else
{
updateGitlabCommitStatus
name:
'Upload Dev Test Out'
,
state:
'failed'
echo
"Milvus Dev Test Out directory don't exists!"
}
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
if
(
fileExists
(
'cluster_test_out'
))
{
def
fileTransfer
=
load
"${env.WORKSPACE}/ci/function/file_transfer.groovy"
fileTransfer
.
FileTransfer
(
"cluster_test_out/"
,
"${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}"
,
'nas storage'
)
if
(
currentBuild
.
resultIsBetterOrEqualTo
(
'SUCCESS'
))
{
echo
"Milvus Dev Test Out Viewer \"ftp://192.168.1.126/data/${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}\""
}
}
else
{
error
(
"Milvus Dev Test Out directory don't exists!"
)
}
}
}
ci/jenkinsfile/upload_dev_test_out.groovy
浏览文件 @
3d3f40ba
container
(
'milvus-testframework'
)
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
gitlabCommitStatus
(
name:
'Upload Dev Test Out'
)
{
if
(
fileExists
(
'test_out'
))
{
try
{
def
fileTransfer
=
load
"${env.WORKSPACE}/ci/function/file_transfer.groovy"
fileTransfer
.
FileTransfer
(
"test_out/"
,
"${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}"
,
'nas storage'
)
if
(
currentBuild
.
resultIsBetterOrEqualTo
(
'SUCCESS'
))
{
echo
"Milvus Dev Test Out Viewer \"ftp://192.168.1.126/data/${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}\""
}
}
catch
(
hudson
.
AbortException
ae
)
{
updateGitlabCommitStatus
name:
'Upload Dev Test Out'
,
state:
'canceled'
currentBuild
.
result
=
'ABORTED'
}
catch
(
exc
)
{
updateGitlabCommitStatus
name:
'Upload Dev Test Out'
,
state:
'failed'
currentBuild
.
result
=
'FAILURE'
}
}
else
{
updateGitlabCommitStatus
name:
'Upload Dev Test Out'
,
state:
'failed'
echo
"Milvus Dev Test Out directory don't exists!"
}
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
if
(
fileExists
(
'test_out'
))
{
def
fileTransfer
=
load
"${env.WORKSPACE}/ci/function/file_transfer.groovy"
fileTransfer
.
FileTransfer
(
"test_out/"
,
"${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}"
,
'nas storage'
)
if
(
currentBuild
.
resultIsBetterOrEqualTo
(
'SUCCESS'
))
{
echo
"Milvus Dev Test Out Viewer \"ftp://192.168.1.126/data/${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}\""
}
}
else
{
error
(
"Milvus Dev Test Out directory don't exists!"
)
}
}
}
ci/main_jenkinsfile
浏览文件 @
3d3f40ba
...
...
@@ -131,59 +131,53 @@ spec:
stage("Deploy to Development") {
parallel {
stage("Single") {
stage("Single Node") {
agent {
kubernetes {
label 'dev-test'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
app: milvus
componet: test
spec:
containers:
- name: milvus-testframework
image: registry.zilliz.com/milvus/milvus-test:v0.2
command:
- cat
tty: true
volumeMounts:
- name: kubeconf
mountPath: /root/.kube/
readOnly: true
volumes:
- name: kubeconf
secret:
secretName: test-cluster-config
"""
}
}
stages {
stage("Deploy to Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/deploy2dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/deploy2dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'canceled'
echo "Milvus Deloy to Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'failed'
echo "Milvus Deloy to Dev failure !"
}
}
}
}
stage("Dev Test") {
agent {
kubernetes {
label 'test'
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
steps {
gitlabCommitStatus(name: 'Deloy Test') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_dev_test_out.groovy"
...
...
@@ -192,140 +186,133 @@ spec:
}
}
}
stage ("Cleanup Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
echo "Milvus Cleanup Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
post {
always {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
}
}
success {
script {
echo "Milvus Single Node CI/CD success !"
}
}
aborted {
script {
echo "Milvus Single Node CI/CD aborted !"
}
}
failure {
script {
echo "Milvus Single Node CI/CD failure !"
}
}
}
}
stage("Cluster") {
agent {
kubernetes {
label 'dev-test'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
app: milvus
componet: test
spec:
containers:
- name: milvus-testframework
image: registry.zilliz.com/milvus/milvus-test:v0.2
command:
- cat
tty: true
volumeMounts:
- name: kubeconf
mountPath: /root/.kube/
readOnly: true
volumes:
- name: kubeconf
secret:
secretName: test-cluster-config
"""
}
}
stages {
stage("Deploy to Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_deploy2dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_deploy2dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'canceled'
echo "Milvus Deloy to Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'failed'
echo "Milvus Deloy to Dev failure !"
}
}
}
}
stage("Dev Test") {
agent {
kubernetes {
label 'test'
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
steps {
gitlabCommitStatus(name: 'Deloy Test') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_
cluster_dev
_test_out.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_
dev_cluster
_test_out.groovy"
}
}
}
}
}
stage ("Cleanup Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
echo "Milvus Cleanup Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
post {
always {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
}
}
success {
script {
echo "Milvus Cluster CI/CD success !"
}
}
aborted {
script {
echo "Milvus Cluster CI/CD aborted !"
}
}
failure {
script {
echo "Milvus Cluster CI/CD failure !"
}
}
}
}
}
...
...
@@ -337,16 +324,18 @@ spec:
post {
always {
script {
if (!currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
// Send an email only if the build status has changed from green/unstable to red
emailext subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
recipientProviders: [
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
],
replyTo: '$DEFAULT_REPLYTO',
to: '$DEFAULT_RECIPIENTS'
if (env.gitlabAfter != null) {
if (!currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
// Send an email only if the build status has changed from green/unstable to red
emailext subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
recipientProviders: [
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
],
replyTo: '$DEFAULT_REPLYTO',
to: '$DEFAULT_RECIPIENTS'
}
}
}
}
...
...
ci/main_jenkinsfile_no_ut
浏览文件 @
3d3f40ba
...
...
@@ -131,59 +131,53 @@ spec:
stage("Deploy to Development") {
parallel {
stage("Single") {
stage("Single Node") {
agent {
kubernetes {
label 'dev-test'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
app: milvus
componet: test
spec:
containers:
- name: milvus-testframework
image: registry.zilliz.com/milvus/milvus-test:v0.2
command:
- cat
tty: true
volumeMounts:
- name: kubeconf
mountPath: /root/.kube/
readOnly: true
volumes:
- name: kubeconf
secret:
secretName: test-cluster-config
"""
}
}
stages {
stage("Deploy to Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/deploy2dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/deploy2dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'canceled'
echo "Milvus Deloy to Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'failed'
echo "Milvus Deloy to Dev failure !"
}
}
}
}
stage("Dev Test") {
agent {
kubernetes {
label 'test'
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
steps {
gitlabCommitStatus(name: 'Deloy Test') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_dev_test_out.groovy"
...
...
@@ -192,140 +186,133 @@ spec:
}
}
}
stage ("Cleanup Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
echo "Milvus Cleanup Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
post {
always {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
}
}
success {
script {
echo "Milvus Single Node CI/CD success !"
}
}
aborted {
script {
echo "Milvus Single Node CI/CD aborted !"
}
}
failure {
script {
echo "Milvus Single Node CI/CD failure !"
}
}
}
}
stage("Cluster") {
agent {
kubernetes {
label 'dev-test'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
app: milvus
componet: test
spec:
containers:
- name: milvus-testframework
image: registry.zilliz.com/milvus/milvus-test:v0.2
command:
- cat
tty: true
volumeMounts:
- name: kubeconf
mountPath: /root/.kube/
readOnly: true
volumes:
- name: kubeconf
secret:
secretName: test-cluster-config
"""
}
}
stages {
stage("Deploy to Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_deploy2dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_deploy2dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'canceled'
echo "Milvus Deloy to Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'failed'
echo "Milvus Deloy to Dev failure !"
}
}
}
}
stage("Dev Test") {
agent {
kubernetes {
label 'test'
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
steps {
gitlabCommitStatus(name: 'Deloy Test') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_
cluster_dev
_test_out.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_
dev_cluster
_test_out.groovy"
}
}
}
}
}
stage ("Cleanup Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
echo "Milvus Cleanup Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
post {
always {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
}
}
success {
script {
echo "Milvus Cluster CI/CD success !"
}
}
aborted {
script {
echo "Milvus Cluster CI/CD aborted !"
}
}
failure {
script {
echo "Milvus Cluster CI/CD failure !"
}
}
}
}
}
...
...
@@ -337,16 +324,18 @@ spec:
post {
always {
script {
if (!currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
// Send an email only if the build status has changed from green/unstable to red
emailext subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
recipientProviders: [
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
],
replyTo: '$DEFAULT_REPLYTO',
to: '$DEFAULT_RECIPIENTS'
if (env.gitlabAfter != null) {
if (!currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
// Send an email only if the build status has changed from green/unstable to red
emailext subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
recipientProviders: [
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
],
replyTo: '$DEFAULT_REPLYTO',
to: '$DEFAULT_RECIPIENTS'
}
}
}
}
...
...
ci/nightly_main_jenkinsfile
浏览文件 @
3d3f40ba
...
...
@@ -131,59 +131,53 @@ spec:
stage("Deploy to Development") {
parallel {
stage("Single") {
stage("Single Node") {
agent {
kubernetes {
label 'dev-test'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
app: milvus
componet: test
spec:
containers:
- name: milvus-testframework
image: registry.zilliz.com/milvus/milvus-test:v0.2
command:
- cat
tty: true
volumeMounts:
- name: kubeconf
mountPath: /root/.kube/
readOnly: true
volumes:
- name: kubeconf
secret:
secretName: test-cluster-config
"""
}
}
stages {
stage("Deploy to Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/deploy2dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/deploy2dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'canceled'
echo "Milvus Deloy to Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'failed'
echo "Milvus Deloy to Dev failure !"
}
}
}
}
stage("Dev Test") {
agent {
kubernetes {
label 'test'
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
steps {
gitlabCommitStatus(name: 'Deloy Test') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_dev_test_out.groovy"
...
...
@@ -192,140 +186,133 @@ spec:
}
}
}
stage ("Cleanup Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
echo "Milvus Cleanup Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
post {
always {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
}
}
success {
script {
echo "Milvus Single Node CI/CD success !"
}
}
aborted {
script {
echo "Milvus Single Node CI/CD aborted !"
}
}
failure {
script {
echo "Milvus Single Node CI/CD failure !"
}
}
}
}
stage("Cluster") {
agent {
kubernetes {
label 'dev-test'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
app: milvus
componet: test
spec:
containers:
- name: milvus-testframework
image: registry.zilliz.com/milvus/milvus-test:v0.2
command:
- cat
tty: true
volumeMounts:
- name: kubeconf
mountPath: /root/.kube/
readOnly: true
volumes:
- name: kubeconf
secret:
secretName: test-cluster-config
"""
}
}
stages {
stage("Deploy to Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_deploy2dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_deploy2dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'canceled'
echo "Milvus Deloy to Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Deloy to Dev', state: 'failed'
echo "Milvus Deloy to Dev failure !"
}
}
}
}
stage("Dev Test") {
agent {
kubernetes {
label 'test'
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
steps {
gitlabCommitStatus(name: 'Deloy Test') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_
cluster_dev
_test_out.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_
dev_cluster
_test_out.groovy"
}
}
}
}
}
stage ("Cleanup Dev") {
agent {
kubernetes {
label 'jenkins-slave'
defaultContainer 'jnlp'
}
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
}
}
}
post {
aborted {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
echo "Milvus Cleanup Dev aborted !"
}
}
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
post {
always {
container('milvus-testframework') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
}
}
success {
script {
echo "Milvus Cluster CI/CD success !"
}
}
aborted {
script {
echo "Milvus Cluster CI/CD aborted !"
}
}
failure {
script {
echo "Milvus Cluster CI/CD failure !"
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录