Commit ac54a22c authored by Tulio Ruiz's avatar Tulio Ruiz
Browse files

[FIX] Show a warn if no file reported by coverage.

ATM it is showing an error and even when it is allowed to fail in the ci is misinterpreted as a fail.

[IMP] Better error message
parent 8a0e6aa3
Pipeline #57022 passed with stage
in 24 seconds
...@@ -39,10 +39,21 @@ def push_files(): ...@@ -39,10 +39,21 @@ def push_files():
values.get('project_name') values.get('project_name')
)) ))
remote_path = '.' remote_path = '.''Pushing files from: %s', local_path)'Pushing files from: %s', local_path)
sftp = get_sftp_client(values.get('username'), values.get('password')) sftp = get_sftp_client(values.get('username'), values.get('password'))
rename(values.get('commit_slug'), local_path) try:
rename(values.get('commit_slug'), local_path)
except OSError:
_logger.warn('Nothing to report from %s', values.get('commit_slug'))
_logger.warn('\nThis job is failing because the coverage report folder is empty this is due to:' +
'\n - No tests were executed' +
'\n - The test job is not properly configured' +
'\n - The results from the tests are stored in a different folder that the expected' +
'\nPlease note that this job should be allowed to fail (allow_failure: true) and the pipeline'
'\n will be yellow until this is fixed, but this shouldn\'t avoid the merge unless is unexpected.' +
'\nFor more information check the project template: ' +
for root, dirs, files in walk(local_path): for root, dirs, files in walk(local_path):
_logger.debug('Root: %s .. Dirs: %s .. Files: %s', root, dirs, files) _logger.debug('Root: %s .. Dirs: %s .. Files: %s', root, dirs, files)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment