forked from codecov/example-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
38 lines (35 loc) · 811 Bytes
/
Jenkinsfile
File metadata and controls
38 lines (35 loc) · 811 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
34
35
36
37
38
pipeline {
agent {
docker { image 'python:3.9' }
}
triggers {
githubPush()
}
environment {
DISABLE_AUTH = 'true'
DB_ENGINE = 'sqlite'
}
stages {
stage('build') {
steps {
echo "Database engine is ${DB_ENGINE}"
echo "DISABLE_AUTH is ${DISABLE_AUTH}"
sh "python3 -m venv ${WORKSPACE}/env"
withPythonEnv("${WORKSPACE}/env/bin/python3"){
sh 'printenv'
sh 'whereis python3'
sh 'python3 --version'
sh 'pip install -r requirements.txt'
sh 'python3 setup.py install'
}
}
}
stage('tests'){
steps{
withPythonEnv("${WORKSPACE}/env/bin/python3"){
sh 'pytest -v tests'
}
}
}
}
}