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' } }