diff --git a/Jenkinsfile b/Jenkinsfile index d1387cb..fab4ecc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,12 +11,10 @@ pipeline { stage('Pull') { steps { script { - // Establecer credenciales - def username = 'tu_usuario' - def password = 'tu_contraseƱa' - // Ejecutar un Git Pull en el servidor remoto - sh "sshpass -p '${password}' ssh -o StrictHostKeyChecking=no ${username}@192.168.1.39 'cd /home/userpi/Status && git pull'" + sshagent(credentials: ['Test']) { + sh 'ssh -v userpi@192.168.1.39 "cd /home/userpi/Status && git pull"' + } } } }