-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjenkinfile
executable file
·58 lines (36 loc) · 1.68 KB
/
jenkinfile
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
// Author: Joseph Kunzler
node('master'){
cleanWs()
stage ("Install Application Dependencies") {
echo "\n==================== Install Application Dependencies=============================\n"
sh '''
PYENV_HOME=$WORKSPACE/.pyenv/
virtualenv --no-site-packages $PYENV_HOME
source $PYENV_HOME/bin/activate
pip install -r requirements.txt
pip install nosexcover
pip install pylint
'''
}
stage ("Execute Unit Tests") {
echo "\n==================== Execute Unit Tests=============================\n"
sh '''
PYENV_HOME=$WORKSPACE/.pyenv/
virtualenv --no-site-packages $PYENV_HOME
source $PYENV_HOME/bin/activate
pylint -f parseable services/ | tee pylint.out
nosetests --with-xcoverage --with-xunit --cover-package services/ || true
'''
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: '**/coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
warnings canComputeNew: false, canResolveRelativePaths: false, categoriesPattern: '', defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'PyLint', pattern: 'pylint.out']], unHealthy: ''
}
stage('Package Artifacts'){
echo "\n==================== Package Files =============================\n"
sh '''
PYENV_HOME=$WORKSPACE/.pyenv/
virtualenv --no-site-packages $PYENV_HOME
source $PYENV_HOME/bin/activate
'''
}
}
}