mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #48783 from KaiSforza/pr-lint-only-diff
Only run lint checks against changed files
This commit is contained in:
commit
04cd9a346a
8
.ci/lint
8
.ci/lint
@ -29,13 +29,13 @@ pipeline {
|
|||||||
parallel {
|
parallel {
|
||||||
stage('salt linting') {
|
stage('salt linting') {
|
||||||
steps {
|
steps {
|
||||||
sh 'eval "$(pyenv init -)"; tox -e pylint-salt | tee pylint-report.xml'
|
sh 'eval "$(pyenv init -)"; tox -e pylint-salt $(find salt/ -name "*.py" -exec git diff --name-only "origin/$CHANGE_TARGET" "origin/$BRANCH_NAME" setup.py {} +) | tee pylint-report.xml'
|
||||||
archiveArtifacts artifacts: 'pylint-report.xml'
|
archiveArtifacts artifacts: 'pylint-report.xml'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('test linting') {
|
stage('test linting') {
|
||||||
steps {
|
steps {
|
||||||
sh 'eval "$(pyenv init -)"; tox -e pylint-tests | tee pylint-report-tests.xml'
|
sh 'eval "$(pyenv init -)"; tox -e pylint-tests $(find tests/ -name "*.py" -exec git diff --name-only "origin/$CHANGE_TARGET" "origin/$BRANCH_NAME" {} +) | tee pylint-report-tests.xml'
|
||||||
archiveArtifacts artifacts: 'pylint-report-tests.xml'
|
archiveArtifacts artifacts: 'pylint-report-tests.xml'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,7 +49,9 @@ pipeline {
|
|||||||
parserName: 'PyLint',
|
parserName: 'PyLint',
|
||||||
pattern: 'pylint-report*.xml'
|
pattern: 'pylint-report*.xml'
|
||||||
]],
|
]],
|
||||||
failedTotalAll: '1',
|
failedTotalAll: '0',
|
||||||
|
useDeltaValues: false,
|
||||||
|
canRunOnFailed: true,
|
||||||
usePreviousBuildAsReference: true
|
usePreviousBuildAsReference: true
|
||||||
])
|
])
|
||||||
cleanWs()
|
cleanWs()
|
||||||
|
@ -598,7 +598,7 @@ class TestSaltProgram(six.with_metaclass(TestSaltProgramMeta, TestProgram)):
|
|||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
try:
|
try:
|
||||||
connect = sock.bind(('localhost', port))
|
connect = sock.bind(('localhost', port))
|
||||||
except:
|
except OSError:
|
||||||
# these ports are already in use, use different ones
|
# these ports are already in use, use different ones
|
||||||
pub_port = 4606
|
pub_port = 4606
|
||||||
ret_port = 4607
|
ret_port = 4607
|
||||||
|
Loading…
Reference in New Issue
Block a user