Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
6cf2f35b
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,发现更多精彩内容 >>
提交
6cf2f35b
编写于
7月 14, 2019
作者:
Q
quicksilver
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update test framework image version to v0.2
Former-commit-id: 636d8c5e46852693ae597cc93fad8f60305f0841
上级
b0a9684a
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
462 addition
and
540 deletion
+462
-540
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
-6
ci/jenkinsfile/cluster_dev_test.groovy
ci/jenkinsfile/cluster_dev_test.groovy
+9
-15
ci/jenkinsfile/deploy2dev.groovy
ci/jenkinsfile/deploy2dev.groovy
+1
-2
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
+131
-144
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
浏览文件 @
6cf2f35b
try
{
try
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
def
result
=
sh
script:
"helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}"
,
returnStatus:
true
if
(
result
)
{
if
(
currentBuild
.
result
==
'ABORTED'
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
throw
new
hudson
.
AbortException
(
"Dev Test Aborted !"
)
}
else
if
(
currentBuild
.
result
==
'FAILURE'
)
{
error
(
"Dev Test Failure !"
)
}
}
}
catch
(
exc
)
{
}
catch
(
exc
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
def
result
=
sh
script:
"helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}"
,
returnStatus:
true
updateGitlabCommitStatus
name:
'Cleanup Dev'
,
state:
'failed'
if
(
result
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
}
throw
exc
throw
exc
}
}
ci/jenkinsfile/cluster_cleanup_dev.groovy
浏览文件 @
6cf2f35b
try
{
try
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
def
result
=
sh
script:
"helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
,
returnStatus:
true
if
(
result
)
{
if
(
currentBuild
.
result
==
'ABORTED'
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
throw
new
hudson
.
AbortException
(
"Cluster Dev Test Aborted !"
)
}
else
if
(
currentBuild
.
result
==
'FAILURE'
)
{
error
(
"Dev Test Failure !"
)
}
}
}
catch
(
exc
)
{
}
catch
(
exc
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
def
result
=
sh
script:
"helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
,
returnStatus:
true
updateGitlabCommitStatus
name:
'Cleanup Dev'
,
state:
'failed'
if
(
result
)
{
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
}
throw
exc
throw
exc
}
}
ci/jenkinsfile/cluster_deploy2dev.groovy
浏览文件 @
6cf2f35b
...
@@ -7,15 +7,14 @@ try {
...
@@ -7,15 +7,14 @@ try {
dir
(
"milvus/milvus-cluster"
)
{
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.3.1 . "
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
{
timeout
(
time:
2
,
unit:
'MINUTES'
)
{
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
waitUntil
{
return
!
result
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
)
{
}
catch
(
exc
)
{
updateGitlabCommitStatus
name:
'Deloy to Dev'
,
state:
'failed'
echo
'Helm running failed!'
echo
'Helm running failed!'
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
throw
exc
throw
exc
...
...
ci/jenkinsfile/cluster_dev_test.groovy
浏览文件 @
6cf2f35b
container
(
'milvus-testframework'
)
{
timeout
(
time:
10
,
unit:
'MINUTES'
)
{
timeout
(
time:
10
,
unit:
'MINUTES'
)
{
try
{
gitlabCommitStatus
(
name:
'Dev Test'
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
try
{
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}"
]]])
dir
(
"${PROJECT_NAME}_test"
)
{
sh
'python3 -m pip install -r requirements.txt'
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
"pytest . --alluredir=cluster_test_out --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster-milvus-cluster-proxy.milvus-cluster.svc.cluster.local"
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 !'
}
}
}
}
catch
(
exc
)
{
echo
'Milvus Test Failed !'
throw
exc
}
}
}
}
ci/jenkinsfile/deploy2dev.groovy
浏览文件 @
6cf2f35b
...
@@ -10,12 +10,11 @@ try {
...
@@ -10,12 +10,11 @@ try {
}
}
timeout
(
time:
2
,
unit:
'MINUTES'
)
{
timeout
(
time:
2
,
unit:
'MINUTES'
)
{
waitUntil
{
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
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
return
!
result
}
}
}
}
}
catch
(
exc
)
{
}
catch
(
exc
)
{
updateGitlabCommitStatus
name:
'Deloy to Dev'
,
state:
'failed'
echo
'Helm running failed!'
echo
'Helm running failed!'
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
sh
"helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}"
throw
exc
throw
exc
...
...
ci/jenkinsfile/dev_test.groovy
浏览文件 @
6cf2f35b
container
(
'milvus-testframework'
)
{
timeout
(
time:
10
,
unit:
'MINUTES'
)
{
timeout
(
time:
10
,
unit:
'MINUTES'
)
{
try
{
gitlabCommitStatus
(
name:
'Dev Test'
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
try
{
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}"
]]])
dir
(
"${PROJECT_NAME}_test"
)
{
sh
'python3 -m pip install -r requirements.txt'
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
"pytest . --alluredir=test_out --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine.kube-opt.svc.cluster.local"
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 !'
}
}
}
}
catch
(
exc
)
{
echo
'Milvus Test Failed !'
throw
exc
}
}
}
}
ci/jenkinsfile/upload_dev_cluster_test_out.groovy
浏览文件 @
6cf2f35b
container
(
'milvus-testframework'
)
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
if
(
fileExists
(
'cluster_test_out'
))
{
gitlabCommitStatus
(
name:
'Upload Dev Test Out'
)
{
def
fileTransfer
=
load
"${env.WORKSPACE}/ci/function/file_transfer.groovy"
if
(
fileExists
(
'cluster_test_out'
))
{
fileTransfer
.
FileTransfer
(
"cluster_test_out/"
,
"${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}"
,
'nas storage'
)
try
{
if
(
currentBuild
.
resultIsBetterOrEqualTo
(
'SUCCESS'
))
{
def
fileTransfer
=
load
"${env.WORKSPACE}/ci/function/file_transfer.groovy"
echo
"Milvus Dev Test Out Viewer \"ftp://192.168.1.126/data/${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}\""
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!"
}
}
}
}
else
{
error
(
"Milvus Dev Test Out directory don't exists!"
)
}
}
}
}
}
}
ci/jenkinsfile/upload_dev_test_out.groovy
浏览文件 @
6cf2f35b
container
(
'milvus-testframework'
)
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
dir
(
"${PROJECT_NAME}_test"
)
{
if
(
fileExists
(
'test_out'
))
{
gitlabCommitStatus
(
name:
'Upload Dev Test Out'
)
{
def
fileTransfer
=
load
"${env.WORKSPACE}/ci/function/file_transfer.groovy"
if
(
fileExists
(
'test_out'
))
{
fileTransfer
.
FileTransfer
(
"test_out/"
,
"${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}"
,
'nas storage'
)
try
{
if
(
currentBuild
.
resultIsBetterOrEqualTo
(
'SUCCESS'
))
{
def
fileTransfer
=
load
"${env.WORKSPACE}/ci/function/file_transfer.groovy"
echo
"Milvus Dev Test Out Viewer \"ftp://192.168.1.126/data/${PROJECT_NAME}/test/${JOB_NAME}-${BUILD_ID}\""
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!"
}
}
}
}
else
{
error
(
"Milvus Dev Test Out directory don't exists!"
)
}
}
}
}
}
}
ci/main_jenkinsfile
浏览文件 @
6cf2f35b
...
@@ -131,59 +131,53 @@ spec:
...
@@ -131,59 +131,53 @@ spec:
stage("Deploy to Development") {
stage("Deploy to Development") {
parallel {
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 {
stages {
stage("Deploy to Dev") {
stage("Deploy to Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy to Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/deploy2dev.groovy"
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
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") {
stage("Dev Test") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy Test') {
label 'test'
container('milvus-testframework') {
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
script {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_dev_test_out.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_dev_test_out.groovy"
...
@@ -192,140 +186,133 @@ spec:
...
@@ -192,140 +186,133 @@ spec:
}
}
}
}
}
}
stage ("Cleanup Dev") {
stage ("Cleanup Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Cleanup Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
}
}
}
}
}
}
}
}
post {
}
aborted {
}
script {
post {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
always {
echo "Milvus Cleanup Dev aborted !"
container('milvus-testframework') {
}
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
}
}
}
}
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") {
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 {
stages {
stage("Deploy to Dev") {
stage("Deploy to Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy to Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_deploy2dev.groovy"
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
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") {
stage("Dev Test") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy Test') {
label 'test'
container('milvus-testframework') {
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
script {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_dev_test.groovy"
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") {
stage ("Cleanup Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Cleanup Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
}
}
}
}
}
}
}
}
post {
}
aborted {
}
script {
post {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
always {
echo "Milvus Cleanup Dev aborted !"
container('milvus-testframework') {
}
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
}
}
}
}
success {
script {
echo "Milvus Cluster CI/CD success !"
}
}
aborted {
script {
echo "Milvus Cluster CI/CD aborted !"
}
}
failure {
script {
echo "Milvus Cluster CI/CD failure !"
}
}
}
}
}
}
}
}
...
...
ci/main_jenkinsfile_no_ut
浏览文件 @
6cf2f35b
...
@@ -131,59 +131,53 @@ spec:
...
@@ -131,59 +131,53 @@ spec:
stage("Deploy to Development") {
stage("Deploy to Development") {
parallel {
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 {
stages {
stage("Deploy to Dev") {
stage("Deploy to Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy to Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/deploy2dev.groovy"
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
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") {
stage("Dev Test") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy Test') {
label 'test'
container('milvus-testframework') {
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
script {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_dev_test_out.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_dev_test_out.groovy"
...
@@ -192,140 +186,133 @@ spec:
...
@@ -192,140 +186,133 @@ spec:
}
}
}
}
}
}
stage ("Cleanup Dev") {
stage ("Cleanup Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Cleanup Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
}
}
}
}
}
}
}
}
post {
}
aborted {
}
script {
post {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
always {
echo "Milvus Cleanup Dev aborted !"
container('milvus-testframework') {
}
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
}
}
}
}
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") {
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 {
stages {
stage("Deploy to Dev") {
stage("Deploy to Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy to Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_deploy2dev.groovy"
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
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") {
stage("Dev Test") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy Test') {
label 'test'
container('milvus-testframework') {
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
script {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_dev_test.groovy"
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") {
stage ("Cleanup Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Cleanup Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
}
}
}
}
}
}
}
}
post {
}
aborted {
}
script {
post {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
always {
echo "Milvus Cleanup Dev aborted !"
container('milvus-testframework') {
}
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
}
}
}
}
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:
...
@@ -337,16 +324,18 @@ spec:
post {
post {
always {
always {
script {
script {
if (!currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
if (env.gitlabAfter != null) {
// Send an email only if the build status has changed from green/unstable to red
if (!currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
emailext subject: '$DEFAULT_SUBJECT',
// Send an email only if the build status has changed from green/unstable to red
body: '$DEFAULT_CONTENT',
emailext subject: '$DEFAULT_SUBJECT',
recipientProviders: [
body: '$DEFAULT_CONTENT',
[$class: 'DevelopersRecipientProvider'],
recipientProviders: [
[$class: 'RequesterRecipientProvider']
[$class: 'DevelopersRecipientProvider'],
],
[$class: 'RequesterRecipientProvider']
replyTo: '$DEFAULT_REPLYTO',
],
to: '$DEFAULT_RECIPIENTS'
replyTo: '$DEFAULT_REPLYTO',
to: '$DEFAULT_RECIPIENTS'
}
}
}
}
}
}
}
...
...
ci/nightly_main_jenkinsfile
浏览文件 @
6cf2f35b
...
@@ -131,59 +131,53 @@ spec:
...
@@ -131,59 +131,53 @@ spec:
stage("Deploy to Development") {
stage("Deploy to Development") {
parallel {
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 {
stages {
stage("Deploy to Dev") {
stage("Deploy to Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy to Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/deploy2dev.groovy"
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
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") {
stage("Dev Test") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy Test') {
label 'test'
container('milvus-testframework') {
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
script {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/dev_test.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_dev_test_out.groovy"
load "${env.WORKSPACE}/ci/jenkinsfile/upload_dev_test_out.groovy"
...
@@ -192,140 +186,133 @@ spec:
...
@@ -192,140 +186,133 @@ spec:
}
}
}
}
}
}
stage ("Cleanup Dev") {
stage ("Cleanup Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Cleanup Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
}
}
}
}
}
}
}
}
}
post {
}
aborted {
}
script {
post {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
always {
echo "Milvus Cleanup Dev aborted !"
container('milvus-testframework') {
}
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup_dev.groovy"
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
}
}
}
}
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") {
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 {
stages {
stage("Deploy to Dev") {
stage("Deploy to Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy to Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_deploy2dev.groovy"
}
stages {
stage('Deploy') {
steps {
gitlabCommitStatus(name: 'Deloy to Dev') {
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") {
stage("Dev Test") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Deloy Test') {
label 'test'
container('milvus-testframework') {
defaultContainer 'jnlp'
containerTemplate {
name 'milvus-testframework'
image 'registry.zilliz.com/milvus/milvus-test:v0.1'
ttyEnabled true
command 'cat'
}
}
}
stages {
stage('Test') {
steps {
script {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_dev_test.groovy"
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") {
stage ("Cleanup Dev") {
agent {
steps {
kubernetes {
gitlabCommitStatus(name: 'Cleanup Dev') {
label 'jenkins-slave'
container('milvus-testframework') {
defaultContainer 'jnlp'
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
stages {
stage('Cleanup') {
steps {
gitlabCommitStatus(name: 'Cleanup Dev') {
script {
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
}
}
}
}
}
}
}
}
}
post {
}
aborted {
}
script {
post {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'canceled'
always {
echo "Milvus Cleanup Dev aborted !"
container('milvus-testframework') {
}
script {
}
load "${env.WORKSPACE}/ci/jenkinsfile/cluster_cleanup_dev.groovy"
failure {
script {
updateGitlabCommitStatus name: 'Cleanup Dev', state: 'failed'
echo "Milvus Cleanup Dev failure !"
}
}
}
}
}
}
}
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录