Skip to content
Snippets Groups Projects
Commit bab03a33 authored by Gioacchino Vino's avatar Gioacchino Vino
Browse files

show scans logs

parent c64fa482
No related branches found
No related tags found
1 merge request!57show scans logs
...@@ -43,6 +43,7 @@ def create_port_list(port_list_name, ports): ...@@ -43,6 +43,7 @@ def create_port_list(port_list_name, ports):
status_text = res.xpath('@status_text')[0] status_text = res.xpath('@status_text')[0]
if status == "201": if status == "201":
id = res.xpath('@id')[0] id = res.xpath('@id')[0]
logging.debug(f'Created port list obj. Name: {port_list_name}, id: {id}, ports: {ports}')
return {'name': port_list_name, 'id': id} return {'name': port_list_name, 'id': id}
else: else:
logging.error(f"ERROR during Port list creation. Status code: {status}, msg: {status_text}") logging.error(f"ERROR during Port list creation. Status code: {status}, msg: {status_text}")
...@@ -423,7 +424,7 @@ def import_dep_info(file_path, endpoints_to_scan): ...@@ -423,7 +424,7 @@ def import_dep_info(file_path, endpoints_to_scan):
################ MAIN ####################################### ################ MAIN #######################################
logging.basicConfig( logging.basicConfig(
filename='debug.log', filename='scans.log',
level=logging.DEBUG, level=logging.DEBUG,
format='%(asctime)s %(levelname)-8s %(message)s', format='%(asctime)s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S', datefmt='%Y-%m-%d %H:%M:%S',
......
...@@ -35,6 +35,14 @@ ...@@ -35,6 +35,14 @@
with_items: "{{report_files.files}}" with_items: "{{report_files.files}}"
when: summary_report_json.global == 'NOK' when: summary_report_json.global == 'NOK'
- name: Load scans log
command: cat "{{ paas_ci_workdir + '/scans.log'}}"
register: scans_log
- name: Show scans log
debug:
msg: "{{ scans_log.output }}"
- name: Detailed report summary - name: Detailed report summary
debug: debug:
var: summary_report_json var: summary_report_json
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment