Skip to content

Commit 3074fbc

Browse files
committed
Jenkinsfile: add flake8 check
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
1 parent 86fc618 commit 3074fbc

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Jenkinsfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env groovy
2+
3+
pipeline {
4+
agent {
5+
label 'python3'
6+
}
7+
options {
8+
timeout(time: 1, unit: 'HOURS')
9+
}
10+
stages {
11+
stage ('flake8') {
12+
steps {
13+
sh '''#!/usr/bin/env bash
14+
virtualenv -q --python python3 venv
15+
. venv/bin/activate
16+
pip install tox
17+
tox -e pep8 --tee --output-file=flake8.txt
18+
'''
19+
script {
20+
def flake8_issues = scanForIssues tool: flake8(pattern:'flake8.txt')
21+
publishIssues id: 'cbt-flake8', name: 'cbt-flake8', issues: [flake8_issues]
22+
}
23+
}
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)