mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 08:35:21 +00:00
improve lint job
This commit is contained in:
parent
6b43fbe863
commit
ffa4ed6a02
15
.ci/lint
15
.ci/lint
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user