forked from zilliztech/knowhere
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable e2e on sse machine (zilliztech#844)
* enable e2e on sse machine Signed-off-by: Yellow Shine <sammy.huang@zilliz.com> * add check for e2e-sse Signed-off-by: Yellow Shine <sammy.huang@zilliz.com> --------- Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
- Loading branch information
1 parent
f55cd58
commit b7da001
Showing
3 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
// int total_timeout_minutes = 120 | ||
def knowhere_wheel='' | ||
pipeline { | ||
agent { | ||
kubernetes { | ||
cloud "new_ci_idc" | ||
inheritFrom 'default' | ||
yamlFile 'ci/pod/e2e-cpu.yaml' | ||
defaultContainer 'main' | ||
} | ||
} | ||
|
||
options { | ||
// timeout(time: total_timeout_minutes, unit: 'MINUTES') | ||
buildDiscarder logRotator(artifactDaysToKeepStr: '30') | ||
parallelsAlwaysFailFast() | ||
disableConcurrentBuilds(abortPrevious: true) | ||
preserveStashes(buildCount: 10) | ||
} | ||
stages { | ||
stage("Build"){ | ||
steps { | ||
container("main"){ | ||
script{ | ||
def date = sh(returnStdout: true, script: 'date +%Y%m%d').trim() | ||
def gitShortCommit = sh(returnStdout: true, script: "echo ${env.GIT_COMMIT} | cut -b 1-7 ").trim() | ||
version="${env.CHANGE_ID}.${date}.${gitShortCommit}" | ||
sh "apt-get update || true" | ||
sh "apt-get install -y libaio-dev libopenblas-dev libcurl4-openssl-dev libdouble-conversion-dev libevent-dev libgflags-dev" | ||
sh "pip3 install conan==1.61.0" | ||
// sh "conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local" | ||
sh "cmake --version" | ||
sh "mkdir build" | ||
sh "cd build/ && conan install .. --build=missing -o with_diskann=True -s compiler.libcxx=libstdc++11 && conan build .." | ||
sh "cd python && VERSION=${version} python3 setup.py bdist_wheel" | ||
dir('python/dist'){ | ||
knowhere_wheel=sh(returnStdout: true, script: 'ls | grep .whl').trim() | ||
archiveArtifacts artifacts: "${knowhere_wheel}", followSymlinks: false | ||
} | ||
// stash knowhere info for rebuild E2E Test only | ||
sh "echo ${knowhere_wheel} > knowhere.txt" | ||
stash includes: 'knowhere.txt', name: 'knowhereWheel' | ||
} | ||
} | ||
} | ||
} | ||
stage("Test"){ | ||
agent { | ||
kubernetes { | ||
cloud "new_ci_idc" | ||
inheritFrom 'default' | ||
yamlFile 'ci/pod/e2e-sse.yaml' | ||
defaultContainer 'main' | ||
} | ||
} | ||
steps { | ||
script{ | ||
if ("${knowhere_wheel}"==''){ | ||
dir ("knowhereWheel"){ | ||
try{ | ||
unstash 'knowhereWheel' | ||
knowhere_wheel=sh(returnStdout: true, script: 'cat knowhere.txt | tr -d \'\n\r\'') | ||
}catch(e){ | ||
error "No knowhereWheel info remained ,please rerun build to build new package." | ||
} | ||
} | ||
} | ||
checkout([$class: 'GitSCM', branches: [[name: '*/main']], extensions: [], | ||
userRemoteConfigs: [[credentialsId: 'milvus-ci', url: 'https://github.com/milvus-io/knowhere-test.git']]]) | ||
dir('tests'){ | ||
unarchive mapping: ["${knowhere_wheel}": "${knowhere_wheel}"] | ||
sh "apt-get update || true" | ||
sh "apt-get install -y libopenblas-dev libaio-dev libdouble-conversion-dev libevent-dev" | ||
sh "pip3 install ${knowhere_wheel}" | ||
sh "cat requirements.txt | xargs -n 1 pip3 install" | ||
sh "cp -r /home/data/milvus/ann_fbin/ ." | ||
sh "pytest -v -m 'L0'" | ||
} | ||
} | ||
} | ||
post{ | ||
always { | ||
script{ | ||
sh 'cat tests/pytest.log' | ||
archiveArtifacts artifacts: 'tests/pytest.log', followSymlinks: false | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: | ||
app: knowhere-e2e | ||
namespace: knowhere-ci | ||
spec: | ||
enableServiceLinks: false | ||
nodeSelector: | ||
node.kubernetes.io/cpu-feature.sse: true | ||
tolerations: | ||
- key: cpu-feature | ||
operator: Equal | ||
value: "sse" | ||
effect: NoSchedule | ||
# affinity: | ||
# podAntiAffinity: | ||
# requiredDuringSchedulingIgnoredDuringExecution: | ||
# - labelSelector: | ||
# matchExpressions: | ||
# - key: app | ||
# operator: In | ||
# values: | ||
# - knowhere-e2e | ||
# topologyKey: "kubernetes.io/hostname" | ||
containers: | ||
- name: main | ||
image: milvusdb/knowhere-cpu-build:amd64-ubuntu22.04-20240528-ccc71670 | ||
tty: true | ||
args: ["cat"] | ||
# resources: | ||
# requests: | ||
# memory: "16Gi" | ||
# cpu: "4" | ||
# limits: | ||
# memory: "16Gi" | ||
# cpu: "4" | ||
volumeMounts: | ||
- mountPath: /home/data | ||
name: db-data | ||
volumes: | ||
- name: db-data | ||
persistentVolumeClaim: | ||
claimName: db-data |