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

Added greenbone check

parent f4b1a872
No related branches found
No related tags found
1 merge request!42Added greenbone check
......@@ -13,27 +13,31 @@ pipeline {
usernamePassword(credentialsId: "jenkins_scans_creds", usernameVariable: 'GMP_USER', passwordVariable: 'GMP_PASSWORD')
]) {
sh '''#!/bin/bash
# oidc-agent initialization
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
if grep -q ERROR depls.output
then
echo "orchent depls: NOT ok"
cat depls.output
exit 1
else
echo "orchent depls: ok"
echo "orchent depls: OK"
fi
which gvm-cli
# Greenbone connection test
/var/lib/jenkins/.local/bin/gvm-cli --gmp-username $GMP_USER --gmp-password $GMP_PASSWORD tls --hostname $HOST_IP --xml "<get_version/>"
/var/lib/jenkins/.local/bin/gvm-cli --gmp-username $GMP_USER --gmp-password $GMP_PASSWORD tls --hostname $HOST_IP --xml "<get_version/>" > gvm.output
if grep -q OK gvm.output
then
echo "gvm check: OK"
else
echo "gvm check: NOT ok"
cat gvm.output
exit 1
fi
'''
}
}
......
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