I have a jenkins stage that will check all the .py files in the repo according to the pycodestyle standard.
For this purpose I am using a .bat file to execute this command. But, if the exit code for the batch file is not 0, the jenkins pipeline will also stop. Is there any way, I can continue the jenkins pipeline execution irrespective of what the exit code is for my batch file?
right now my stage looks something like this.
pycodestyle: {
powershell"""
.\\venv\\Scripts\\Activate.ps1
${WORKSPACE}\\code_analyzer\\check_pycodestyle.bat 2>&1 | tee pycodestyle.log
"""
The output of the batch file looks something like this.
[2023-04-03T09:20:23.748Z]
[2023-04-03T09:20:23.748Z] _PR-27>pycodestyle --exclude venv,mfile,resource_rc.py --config=_PR-27\code_analyzer\\pep8.config _PR-27\code_analyzer\\..
[2023-04-03T09:20:23.748Z] _PR-27\code_analyzer\\..\release\whl_release.py:47:1: E402 module level import not at top of file
[2023-04-03T09:20:24.009Z] _PR-27\code_analyzer\\..\tests\system\test_utils_build_and_install.py:31:1: E402 module level import not at top of file
[2023-04-03T09:20:24.269Z] _PR-27\code_analyzer\\..\utils\helper.py:45:1: W391 blank line at end of file
script returned exit code 1
I want to continue the execution of the jenkins pipeline even after the exit code is 1.