This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
59 lines (58 loc) · 1.77 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
pipeline {
agent {
docker {
image 'python:3.7.5'
}
}
stages {
stage('Install') {
environment {
POETRY_HOME = "poetry"
HOME = "."
}
steps {
script {
sh """
pwd
mkdir -p poetry poetry-cache
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
poetry/bin/poetry config cache-dir poetry-cache
poetry/bin/poetry config virtualenvs.in-project true
poetry/bin/poetry install
"""
}
}
}
stage('Static Checks') {
steps {
script {
sh '''
poetry/bin/poetry run flake8 secrender
'''
}
}
}
stage('Unit Tests') {
steps {
script {
sh '''
poetry/bin/poetry run pytest -v tests
'''
}
}
}
stage('Functional Tests') {
steps {
script {
sh '''
cd examples
../poetry/bin/poetry run secrender --in example.yaml --template example.md.j2 --output example.md
cat example.md
../poetry/bin/poetry run secrender --in example-include.yaml --template example.md.j2 --output example.md
cat example.md
'''
}
}
}
}
}