-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathJenkinsfile
More file actions
33 lines (32 loc) · 849 Bytes
/
Jenkinsfile
File metadata and controls
33 lines (32 loc) · 849 Bytes
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
stage("Build and Publish") {
node('d2l-worker') {
ws('workspace/d2l-book') {
checkout scm
sh '''set -ex
conda remove -n d2l-book-build --all -y
conda create -n d2l-book-build python=3.9 pip -y
conda activate d2l-book-build
pip install .
python -m unittest d2lbook/*_test.py
# pip install mypy
# mypy --ignore-missing-imports d2lbook/*_test.py
cd docs
rm -rf _build
pip install matplotlib numpy mypy
d2lbook build eval
d2lbook build eval --tab numpy
d2lbook build eval --tab cpython
d2lbook build pdf
d2lbook build html --tab all
'''
if (env.BRANCH_NAME == 'master') {
sh '''set -ex
conda activate d2l-book-build
cd docs
d2lbook deploy html pdf
d2lbook clear
'''
}
}
}
}