Skip to content

Commit 7f8b524

Browse files
author
schmide
committed
Jenkins file for branch specific CI (climada_branches)
1 parent b227cba commit 7f8b524

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

Jenkinsfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
pipeline {
2+
agent any
3+
4+
stages {
5+
stage('ci') {
6+
parallel {
7+
8+
stage('lint') {
9+
steps {
10+
sh '''#!/bin/bash
11+
export PATH=$PATH:$CONDAPATH
12+
source activate climada_env
13+
pylint -ry climada | tee pylint.log'''
14+
15+
step([
16+
$class: 'WarningsPublisher',
17+
parserConfigurations: [[
18+
parserName: 'PyLint',
19+
pattern : 'pylint.log'
20+
]],
21+
unstableTotalHigh: '25',
22+
usePreviousBuildAsReference: true
23+
])
24+
}
25+
}
26+
27+
stage('unit_test') {
28+
steps {
29+
sh '''#!/bin/bash
30+
export PATH=$PATH:$CONDAPATH
31+
source activate climada_env
32+
python -m coverage run tests_runner.py unit
33+
python -m coverage xml -o coverage.xml
34+
python -m coverage html -d coverage'''
35+
}
36+
}
37+
38+
}
39+
}
40+
}
41+
42+
post {
43+
always {
44+
junit 'tests_xml/*.xml'
45+
cobertura coberturaReportFile: 'coverage.xml'
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)