Commit 719d9b53 authored by Jin Hai's avatar Jin Hai Committed by GitHub
Browse files

Merge pull request #99 from milvus-ci-robot/0.5.1

Add ELK for Milvus 0.5.1 Jenkins CI

Former-commit-id: ad9c45519d04887ea1cb1c06fd04ca138e76b04e
parents 37f8d2fd a3ba8ffb
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
String cron_string = BRANCH_NAME == "master" || BRANCH_NAME == "0.5.0" || BRANCH_NAME == "0.5.1" ? "H 0 * * *" : ""
pipeline {
    agent none

    triggers { cron(cron_string) }

    options {
        timestamps()
    }
@@ -20,6 +23,7 @@ pipeline {
        SEMVER = "${BRANCH_NAME}"
        JOBNAMES = env.JOB_NAME.split('/')
        PIPELINE_NAME = "${JOBNAMES[0]}"
        NIGHTLIY_TEST = "${cron_string == "" ? false : true}"
    }

    stages {
@@ -119,11 +123,15 @@ pipeline {
                            steps {
                                container('milvus-test-env') {
                                    script {
                                        if (NIGHTLIY_TEST) {
                                            load "${env.WORKSPACE}/ci/jenkins/jenkinsfile/singleDevNightlyTest.groovy"
                                        } else {
                                            load "${env.WORKSPACE}/ci/jenkins/jenkinsfile/singleDevTest.groovy"
                                        }
                                    }
                                }
                            }
                        }

                        stage ("Cleanup Dev") {
                            steps {
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ try {
    dir ('milvus-helm') {
        checkout([$class: 'GitSCM', branches: [[name: "0.5.0"]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: "${params.GIT_CREDENTIALS_ID}", url: "https://github.com/milvus-io/milvus-helm.git", name: 'origin', refspec: "+refs/heads/0.5.0:refs/remotes/origin/0.5.0"]]])
        dir ("milvus-gpu") {
            sh "helm install --wait --timeout 300 --set engine.image.tag=${DOCKER_VERSION} --set expose.type=clusterIP --name ${env.PIPELINE_NAME}-${env.BUILD_NUMBER}-single-gpu -f ci/values.yaml --namespace milvus ."
            sh "helm install --wait --timeout 300 --set engine.image.tag=${DOCKER_VERSION} --set expose.type=clusterIP --name ${env.PIPELINE_NAME}-${env.BUILD_NUMBER}-single-gpu -f ci/values.yaml -f ci/filebeat/values.yaml --namespace milvus ."
        }
    }
} catch (exc) {
+22 −0
Original line number Diff line number Diff line
timeout(time: 90, unit: 'MINUTES') {
    dir ("tests/milvus_python_test") {
        sh 'python3 -m pip install -r requirements.txt'
        sh "pytest . --alluredir=\"test_out/dev/single/sqlite\" --ip ${env.PIPELINE_NAME}-${env.BUILD_NUMBER}-single-gpu-milvus-gpu-engine.milvus.svc.cluster.local"
    }
    // mysql database backend test
    load "${env.WORKSPACE}/ci/jenkins/jenkinsfile/cleanupSingleDev.groovy"

    if (!fileExists('milvus-helm')) {
        dir ("milvus-helm") {
            checkout([$class: 'GitSCM', branches: [[name: "0.5.0"]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: "${params.GIT_CREDENTIALS_ID}", url: "https://github.com/milvus-io/milvus-helm.git", name: 'origin', refspec: "+refs/heads/0.5.0:refs/remotes/origin/0.5.0"]]])
        }
    }
    dir ("milvus-helm") {
        dir ("milvus-gpu") {
            sh "helm install --wait --timeout 300 --set engine.image.tag=${DOCKER_VERSION} --set expose.type=clusterIP --name ${env.PIPELINE_NAME}-${env.BUILD_NUMBER}-single-gpu -f ci/db_backend/mysql_values.yaml -f ci/filebeat/values.yaml --namespace milvus ."
        }
    }
    dir ("tests/milvus_python_test") {
        sh "pytest . --alluredir=\"test_out/dev/single/mysql\" --ip ${env.PIPELINE_NAME}-${env.BUILD_NUMBER}-single-gpu-milvus-gpu-engine.milvus.svc.cluster.local"
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ timeout(time: 60, unit: 'MINUTES') {
    }
    dir ("milvus-helm") {
        dir ("milvus-gpu") {
            sh "helm install --wait --timeout 300 --set engine.image.tag=${DOCKER_VERSION} --set expose.type=clusterIP --name ${env.PIPELINE_NAME}-${env.BUILD_NUMBER}-single-gpu -f ci/db_backend/mysql_values.yaml --namespace milvus ."
            sh "helm install --wait --timeout 300 --set engine.image.tag=${DOCKER_VERSION} --set expose.type=clusterIP --name ${env.PIPELINE_NAME}-${env.BUILD_NUMBER}-single-gpu -f ci/db_backend/mysql_values.yaml -f ci/filebeat/values.yaml --namespace milvus ."
        }
    }
    dir ("tests/milvus_python_test") {