forked from deeppavlov/DeepPavlov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
43 lines (43 loc) · 1.47 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
node('gpu') {
timestamps {
try {
stage('Clean') {
sh "rm -rf .[^.] .??* *"
}
stage('Checkout') {
sh "cp -r ${pwd()}@script/* ."
}
stage('Setup') {
env.TFHUB_CACHE_DIR="tfhub_cache"
env.LD_LIBRARY_PATH="/usr/local/cuda-9.0/lib64"
sh """
virtualenv --python=python3 '.venv-$BUILD_NUMBER'
. '.venv-$BUILD_NUMBER/bin/activate'
pip install .[tests,docs]
pip install -r deeppavlov/requirements/tf-gpu.txt
rm -rf `find . -mindepth 1 -maxdepth 1 ! -name tests ! -name Jenkinsfile ! -name docs ! -name '.venv-$BUILD_NUMBER'`
"""
}
stage('Tests') {
sh """
. .venv-$BUILD_NUMBER/bin/activate
pytest -v --disable-warnings
cd docs
make clean
make html
"""
currentBuild.result = 'SUCCESS'
}
}
catch(e) {
currentBuild.result = 'FAILURE'
throw e
}
finally {
emailext to: '${DEFAULT_RECIPIENTS}',
subject: "${env.JOB_NAME} - Build # ${currentBuild.number} - ${currentBuild.result}!",
body: '${BRANCH_NAME} - ${BUILD_URL}',
attachLog: true
}
}
}