From bfd97feb7bb3c49f134202c6ec6e41ab79c54fd2 Mon Sep 17 00:00:00 2001
From: "gioacchino.vino" <gioacchino.vino@infn.it>
Date: Thu, 28 Sep 2023 00:27:07 +0200
Subject: [PATCH 1/2] config wait time

---
 tasks/1-create-deployment.yml | 2 +-
 tests/test-jupyter-vm.yml     | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tasks/1-create-deployment.yml b/tasks/1-create-deployment.yml
index 9a27840..703189a 100644
--- a/tasks/1-create-deployment.yml
+++ b/tasks/1-create-deployment.yml
@@ -35,7 +35,7 @@
   command: orchent depshow --ojson "{{ deployment.uuid }}"
   register: depshow_output
   until: "'PROGRESS' not in depshow_output.stdout"
-  retries: 18
+  retries: "{{ paas_ci_test.n_timeout_ticks }}"
   delay: 300
   failed_when: "'error' in depshow_output.stdout"
 
diff --git a/tests/test-jupyter-vm.yml b/tests/test-jupyter-vm.yml
index f4874af..c84a17b 100644
--- a/tests/test-jupyter-vm.yml
+++ b/tests/test-jupyter-vm.yml
@@ -11,7 +11,8 @@
       name: paas-ci
     vars:
       paas_ci_test:
-        template_url: https://baltig.infn.it/infn-cloud/tosca-templates/-/raw/master/jupyter/jupyter_vm.yaml
+        template_url: https://baltig.infn.it/infn-cloud/tosca-templates/-/raw/master/j  upyter/jupyter_vm.yaml
+        n_timeout_ticks: 18
         inputs: |
           '{ "enable_monitoring": "true", "users": [{"os_user_add_to_sudoers": true, "os_user_name": "scans", "os_user_ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmQvE3sXtg4D/KYzhCdP6cICvy5foeSkHenKTisxdGJK8L0cDmV+4k7fIah1GIXrldjQBGWHSTbIj1qRTXG2OPWFxeDoXIN1FyKxwdOgwIfzIRtVq18VZEqt9eOiNUXN8jGoEAgcU7obqXuPqKAndk4tyOnSDuVnfnZWAiesVvWK16GEq0PAxBhJoX3eq501ilsNnJZDMEnvQEgtFuIbADEanrhRV3yaEca+9vFyOQRkyxDF8Gn6P/wZ4oe35bdgXxi/hg8JVKYbDCLlT+Fdi+OC3trRhwCcBSvDFD0ZQ8oLemzUk+732TqR+I8gVjPE9fiNF+/mrj5OX55SDr8Qgf scans"}]}'
         endpoints_to_scan: |
-- 
GitLab


From 72f065ee381f36e25c074c622d4dbd932647f58b Mon Sep 17 00:00:00 2001
From: "gioacchino.vino" <gioacchino.vino@infn.it>
Date: Thu, 28 Sep 2023 00:27:45 +0200
Subject: [PATCH 2/2] removed debug lines

---
 tasks/2-scan.yml | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/tasks/2-scan.yml b/tasks/2-scan.yml
index 0842bcd..cf5ba04 100644
--- a/tasks/2-scan.yml
+++ b/tasks/2-scan.yml
@@ -1,6 +1,6 @@
 
 ---
-- name: Set SSH tunnel
+- name: Set SSH tunel
   command: ssh -o StrictHostKeyChecking=no -f -N -L localhost:9390:192.168.235.234:9390 jenkins@scans.cloud.infn.it 
 
 - debug: 
@@ -11,11 +11,6 @@
     src: files/script.py
     dest: "{{ paas_ci_scan_script_path }}"
 
-- name: Remove existing reports
-  command: "rm -f *report.txt"
-  args:
-    chdir: "{{ paas_ci_workdir }}"
-
 - name:  Run scan
   command: "python3 {{ paas_ci_scan_script_path }} {{ paas_ci_test.endpoints_to_scan }} {{ paas_ci_workdir + '/dep.json'}} {{ paas_ci_workdir }}" 
   register: scan_output
@@ -31,15 +26,6 @@
 #     msg: "{{lookup('file', item.path)}}"
 #   with_items: "{{report_files.files}}"
 
-- name: Chech reports
-  command: "cat *report.txt |  grep Port | sort | uniq "
-  args:
-    chdir: "{{ paas_ci_workdir }}"
-  register: report_ports_output
-
-- debug:
-    var: report_ports_output
-
 - name: get Severity file content
   shell: cat "{{ paas_ci_workdir + '/severity.json'}}"
   register: severity 
-- 
GitLab