From 69e8b432a28f0b76d06d3914812d51f2578b6c9e Mon Sep 17 00:00:00 2001 From: mayekkuzu Date: Thu, 26 Sep 2024 21:27:17 +0300 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index f128dbb..06f0eac 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,6 +5,7 @@ pipeline { stage('Copy Files on Server') { steps { withCredentials([usernamePassword(credentialsId: 'QuizServerCreds', usernameVariable: 'USERNAME', passwordVariable: 'SERVER_IP')]) { + sh 'ssh-keyscan ${SERVER_IP} > ~/.ssh/known_hosts' sh 'rsync -avzhe ssh * ${USERNAME}@${SERVER_IP}:/var/www/public_html' } }