From 344072ee021c92cfca406fe97c7dbf26559be735 Mon Sep 17 00:00:00 2001
From: "gioacchino.vino" <gioacchino.vino@infn.it>
Date: Tue, 26 Sep 2023 17:54:56 +0200
Subject: [PATCH] Added greenbone check in env test

---
 jenkinsfile/Jenkinsfile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/jenkinsfile/Jenkinsfile b/jenkinsfile/Jenkinsfile
index 525180e..96f7596 100644
--- a/jenkinsfile/Jenkinsfile
+++ b/jenkinsfile/Jenkinsfile
@@ -4,7 +4,6 @@ pipeline {
     environment {
         ORCHENT_AGENT_ACCOUNT='infn-cloud'
         ORCHENT_URL='https://my.cloud.infn.it/orchestrator'
-        PASS=''
     }
     
     stages {
@@ -13,6 +12,10 @@ pipeline {
                 sh '''#!/bin/bash
                     eval `oidc-agent-service use`
                     oidc-add infn-cloud-ops
+                    
+                    env
+                    
+                    # Orchent connection test
                     orchent depls > depls.output
                     if cat depls.output | grep -q ERROR
                     then 
@@ -22,6 +25,11 @@ pipeline {
                     else 
                         echo "orchent depls: ok" 
                     fi
+
+                    # Greenbone connection test
+                    export HOST_IP=`/sbin/ip route list scope link | grep -v " 172." | awk '{print $7}' | tr -d '\n'`
+                    gvm-cli --gmp-username $GMP_USERNAME --gmp-password $GMP_PASSWD tls --hostname $HOST_IP --xml "<get_version/>"
+
                 '''
             }
         }
-- 
GitLab