improve lint job

This commit is contained in:
Bryce Larson 2019-09-26 16:56:03 -06:00
parent 6b43fbe863
commit ffa4ed6a02
No known key found for this signature in database
GPG Key ID: 131C38B0F02DB4CA

View File

@ -46,9 +46,10 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') {
eval "$(pyenv init -)"
pyenv --version
pyenv install --skip-existing 2.7.15
pyenv shell 2.7.15
pyenv install --skip-existing 3.6.8
pyenv shell 3.6.8 2.7.15
python --version
pip install -U nox-py2
pip3 install -U nox-py2
nox --version
# Create the required virtualenvs in serial
nox --install-only -e lint-salt
@ -69,7 +70,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') {
if (readFile('file-list-changed.log') =~ /(?i)(^|\n)(salt\/.*\.py|setup\.py)\n/) {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
pyenv shell 3.6.8 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-salt-chg.log
grep -Ei '^salt/.*\\.py$|^setup\\.py$' file-list-changed.log | xargs -r '--delimiter=\\n' nox -e lint-salt --
@ -80,7 +81,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') {
// Always lint something so reporting doesn't fail
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
pyenv shell 3.6.8 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-salt-chg.log
nox -e lint-salt -- salt/ext/__init__.py
@ -95,7 +96,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') {
if (readFile('file-list-changed.log') =~ /(?i)(^|\n)tests\/.*\.py\n/) {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
pyenv shell 3.6.8 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-tests-chg.log
grep -Ei '^tests/.*\\.py$' file-list-changed.log | xargs -r '--delimiter=\\n' nox -e lint-tests --
@ -128,7 +129,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') {
stage('Lint Salt Full') {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
pyenv shell 3.6.8 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-salt-full.log
nox -e lint-salt
@ -141,7 +142,7 @@ wrappedNode('lint', global_timeout, '#jenkins-prod-pr') {
stage('Lint Tests Full') {
sh shell_header + '''
eval "$(pyenv init - --no-rehash)"
pyenv shell 2.7.15
pyenv shell 3.6.8 2.7.15
EC=254
export PYLINT_REPORT=pylint-report-tests-full.log
nox -e lint-salt