blob: 036e616dda37626a4e568c4c74d79be716855842 (
plain)
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
44
45
46
47
48
49
50
51
52
53
|
/* This is intended to test the dev & master branches of the gr-api project,
where the tests are entirely self contained
*/
pipeline {
agent any
triggers {
cron('H */6 * * *')
pollSCM('H */3 * * *')
}
options {
skipDefaultCheckout()
}
environment {
DATA_SRC = "${env.WORKSPACE}/mnt/"
VENV = "${env.WORKSPACE}/amt-jb-venv"
}
stages {
stage('setup') {
steps {
deleteDir()
withCredentials([file(
credentialsId: '971e1f48-09ce-4446-9155-a52c1adb6249',
variable: 'ENV_TEST_FILE')]) {
sh 'cp $ENV_TEST_FILE .env.test'
}
sh "/usr/local/bin/python3.14 -m venv ${VENV}"
sh "${VENV}/bin/pip install -U setuptools wheel pip"
sh "${VENV}/bin/pip install -r requirements.txt"
sh "${VENV}/bin/pip install django"
}
}
stage('tests') {
steps {
sh '$VENV/bin/pytest tests/test_postgres.py -vs'
}
}
}
post {
always {
echo 'One way or another, I have finished'
deleteDir() /* clean up our workspace */
}
}
}
|