From 090ffb3f50f71f34be9f94c8ef32c19979776dd8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 16 Jul 2026 11:17:34 +0200 Subject: [PATCH] Refactor Jenkinsfile to add ssh-keyscan before SCP command --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bad987f..cfddca3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,6 +11,7 @@ pipeline { } stages { + stage('Checkout') { steps { checkout scm @@ -45,10 +46,9 @@ pipeline { stage("Upload to aptly") { steps { sshagent(['srv01_elordenador_org']) { - sh ''' - scp ../${DEB_FILE} \ - ${APTLY_HOST}:/tmp/ + ssh-keyscan -H elordenador.org >> ~/.ssh/known_hosts + scp ../${DEB_FILE} ${APTLY_HOST}:/tmp/ ''' } }