Skip to content

Commit

Permalink
Jenkinsfile: add flake8 check
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Oct 22, 2020
1 parent 86fc618 commit 6e9bca9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env groovy

pipeline {
agent {
label 'python3'
}
options {
timeout(time: 1, unit: 'HOURS')
}
stages {
stage ('flake8') {
steps {
sh '''#!/usr/bin/env bash
virtualenv -q --python python3 venv
. venv/bin/activate
pip install tox
tox -e pep8 -- --tee --output-file=flake8.txt
'''
script {
def flake8_issues = scanForIssues tool: flake8(pattern:'flake8.txt')
publishIssues id: 'cbt-flake8', name: 'cbt-flake8', issues: [flake8_issues]
}
}
}
}
}

0 comments on commit 6e9bca9

Please sign in to comment.