Refactor Jenkinsfile to add ssh-keyscan before SCP command

This commit is contained in:
2026-07-16 11:17:34 +02:00
parent d2b6ce7dbc
commit 090ffb3f50
Vendored
+3 -3
View File
@@ -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/
'''
}
}