Delete unittest binary on jenkins ci packaging stage

This commit is contained in:
quicksilver 2019-11-08 10:46:25 +08:00
parent 32b609aaf3
commit c4f56ddd36
3 changed files with 15 additions and 4 deletions

View File

@ -75,7 +75,7 @@ pipeline {
steps {
container('milvus-build-env') {
script {
load "${env.WORKSPACE}/ci/jenkins/step/package.groovy"
load "${env.WORKSPACE}/ci/jenkins/step/packaging.groovy"
}
}
}

13
ci/jenkins/scripts/packaging.sh Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -ex
pip3 install -r requirements.txt
./yaml_processor.py merge -f /opt/milvus/conf/server_config.yaml -m ../yaml/update_server_config.yaml -i && \
rm /opt/milvus/conf/server_config.yaml.bak
if [ -d "/opt/milvus/unittest" ]; then
rm -rf "/opt/milvus/unittest"
fi
tar -zcvf ./${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz -C /opt/ milvus

View File

@ -1,9 +1,7 @@
timeout(time: 5, unit: 'MINUTES') {
dir ("ci/jenkins/scripts") {
sh "pip3 install -r requirements.txt"
sh "./yaml_processor.py merge -f /opt/milvus/conf/server_config.yaml -m ../yaml/update_server_config.yaml -i && rm /opt/milvus/conf/server_config.yaml.bak"
sh "./packaging.sh"
}
sh "tar -zcvf ./${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz -C /opt/ milvus"
withCredentials([usernamePassword(credentialsId: "${params.JFROG_CREDENTIALS_ID}", usernameVariable: 'JFROG_USERNAME', passwordVariable: 'JFROG_PASSWORD')]) {
def uploadStatus = sh(returnStatus: true, script: "curl -u${JFROG_USERNAME}:${JFROG_PASSWORD} -T ./${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz ${params.JFROG_ARTFACTORY_URL}/milvus/package/${PROJECT_NAME}-${PACKAGE_VERSION}.tar.gz")
if (uploadStatus != 0) {