dev_test.groovy 989 字节
Newer Older
1 2 3 4 5
container('milvus-testframework') {
    timeout(time: 10, unit: 'MINUTES') {
        gitlabCommitStatus(name: 'Dev Test') {
            try {
                dir ("${PROJECT_NAME}_test") {
6
                    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}"]]])
7 8 9 10 11 12 13 14 15 16 17
                    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 !'
            }
        }
    }
}
18