pipeline { agent any stages { stage('Copy Files on Server') { steps { withCredentials([usernamePassword(credentialsId: 'QuizServerCreds', usernameVariable: 'USERNAME', passwordVariable: 'SERVER_IP')]) { sh 'rsync -avzhe ssh * ${USERNAME}@${SERVER_IP}:/var/www/public_html' } } } } }