Newer
Older
command: ssh -o StrictHostKeyChecking=no -f -N -L localhost:9390:scans.cloud.infn.it:9390 jenkins@scans.cloud.infn.it
- name: Copy script to run
copy:
src: files/script.py
command: "python3 {{ paas_ci_scan_script_path }} {{ paas_ci_test.endpoints_to_scan }} {{ paas_ci_workdir + '/dep.json'}} {{ paas_ci_workdir }}"
register: scan_output
- name: Find report files
find:
paths: "{{paas_ci_workdir}}"
- name: read summary report file
shell: cat "{{ paas_ci_workdir + '/summary-report.json'}}"
register: summary_report
summary_report_json: "{{ summary_report.stdout | from_json }}"
debug:
msg: "{{lookup('file', item.path)}}"
with_items: "{{report_files.files}}"
when: summary_report_json.global == 'NOK'
- name: Detailed report summary
debug:
- summary_report_json.global == 'OK'
fail_msg: "SCAN FAILED - deployment: {{ summary_report_json.deployment }}"
success_msg: "SCAN PASSED - deployment: {{ summary_report_json.deployment }}"