only run pylint on files that change

This commit is contained in:
Daniel Wallace 2018-07-16 13:52:16 -05:00
parent 61572b6780
commit 779d1a3dcb
No known key found for this signature in database
GPG key ID: 5FA5E5544F010D48

View file

@ -24,13 +24,13 @@ pipeline {
parallel {
stage('salt linting') {
steps {
sh 'eval "$(pyenv init -)"; tox -e pylint-salt | tee pylint-report.xml'
sh 'eval "$(pyenv init -)"; tox -e pylint-salt $(git diff --name-only "origin/$CHANGE_TARGET" "origin/$BRANCH_NAME" setup.py salt/*.py salt/**/*.py)| tee pylint-report.xml'
archiveArtifacts artifacts: 'pylint-report.xml'
}
}
stage('test linting') {
steps {
sh 'eval "$(pyenv init -)"; tox -e pylint-tests | tee pylint-report-tests.xml'
sh 'eval "$(pyenv init -)"; tox -e pylint-tests $(git diff --name-only "origin/$CHANGE_TARGET" "origin/$BRANCH_NAME" tests/*.py tests/**/*.py)| tee pylint-report-tests.xml'
archiveArtifacts artifacts: 'pylint-report-tests.xml'
}
}