diff --git a/jenkinsfile/Jenkinsfile b/jenkinsfile/Jenkinsfile index 0bfe6f6b4cf6e335a5e308c7bfb473cff71849d9..84003af87983faebea8c0703cac97c2c7f56c9b9 100644 --- a/jenkinsfile/Jenkinsfile +++ b/jenkinsfile/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent { label 'docker-agent' } + agent { label 'docker-paas-agent' } environment { ORCHENT_AGENT_ACCOUNT='infn-cloud-ops' @@ -10,6 +10,7 @@ pipeline { stage ('Test environment'){ steps { withCredentials([ + sshUserPrivateKey(credentialsId: "ssh_scans", keyFileVariable: 'keyfile'), usernamePassword(credentialsId: "jenkins_scans_creds", usernameVariable: 'GMP_USER', passwordVariable: 'GMP_PASSWORD') ]) { sh '''#!/bin/bash @@ -31,10 +32,10 @@ pipeline { fi # Create ssh tunnel + cp ${keyfile} /home/jenkins/.ssh/id_rsa ssh -o StrictHostKeyChecking=no -f -N -L localhost:9390:192.168.235.234:9390 jenkins@scans.cloud.infn.it # Greenbone connection test - #/var/lib/jenkins/.local/bin/gvm-cli --gmp-username $GMP_USER --gmp-password $GMP_PASSWORD tls --hostname 127.0.0.1 --xml "<get_version/>" > gvm.output /usr/local/bin/gvm-cli --gmp-username $GMP_USER --gmp-password $GMP_PASSWORD tls --hostname 127.0.0.1 --xml "<get_version/>" > gvm.output if grep -q OK gvm.output then