milvus/ci/jenkinsfile/packaged_milvus_no_ut.groovy
quicksilver 9ec7b773c3 MS-161 - Add CI / CD Module to Milvus Project
Former-commit-id: 16869771664aeea633d14f2db05c7a6fb8441e64
2019-07-05 18:07:40 +08:00

27 lines
1.4 KiB
Groovy

container('milvus-build-env') {
timeout(time: 5, unit: 'MINUTES') {
dir ("milvus_engine") {
dir ("cpp") {
gitlabCommitStatus(name: 'Packaged Engine') {
if (fileExists('milvus')) {
try {
sh "tar -zcvf ./${PROJECT_NAME}-engine-${PACKAGE_VERSION}.tar.gz ./milvus"
def fileTransfer = load "${env.WORKSPACE}/ci/function/file_transfer.groovy"
fileTransfer.FileTransfer("${PROJECT_NAME}-engine-${PACKAGE_VERSION}.tar.gz", "${PROJECT_NAME}/engine/${JOB_NAME}-${BUILD_ID}", 'nas storage')
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
echo "Download Milvus Engine Binary Viewer \"http://192.168.1.126:8080/${PROJECT_NAME}/engine/${JOB_NAME}-${BUILD_ID}/${PROJECT_NAME}-engine-${PACKAGE_VERSION}.tar.gz\""
}
} catch (exc) {
updateGitlabCommitStatus name: 'Packaged Engine', state: 'failed'
throw exc
}
} else {
updateGitlabCommitStatus name: 'Packaged Engine', state: 'failed'
error("Milvus binary directory don't exists!")
}
}
}
}
}
}