2020-11-30 23:14:50 +01:00
|
|
|
pipeline {
|
2020-12-01 21:28:24 +01:00
|
|
|
agent { docker { image 'python:3.7.2' } }
|
2020-11-30 23:14:50 +01:00
|
|
|
|
|
|
|
stages {
|
2020-12-01 21:28:24 +01:00
|
|
|
stage('Build and test') {
|
2020-12-01 19:46:23 +01:00
|
|
|
steps {
|
2020-12-01 20:06:24 +01:00
|
|
|
sh 'pwd'
|
2020-12-01 21:28:24 +01:00
|
|
|
sh 'ls'
|
|
|
|
dir("${env.WORKSPACE}/rest-app"){
|
|
|
|
sh 'pwd'
|
|
|
|
sh 'ls'
|
|
|
|
sh 'python3 -m venv venv && . venv/bin/activate && pip3 install -r requirements.txt && python3 manage.py migrate && python3 manage.py test'
|
|
|
|
}
|
2020-11-30 23:14:50 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-12-01 19:46:23 +01:00
|
|
|
}
|