From 7ec9981a833a5c82b3a5a600874d3c8266dc2104 Mon Sep 17 00:00:00 2001 From: vgallegoiz Date: Sun, 5 May 2024 21:02:10 +0200 Subject: [PATCH] Test Jenkinsfile --- Jenkinsfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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"' + } } } }