From 94168e28e08294ec1686fcb485453f4ccc5fdfef Mon Sep 17 00:00:00 2001 From: VIPIN Date: Fri, 29 Aug 2025 00:01:07 +0530 Subject: [PATCH] Trigger fresh Jenkins build --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9194084..54c6b12 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -61,12 +61,12 @@ pipeline { sshagent([env.SSH_CRED]) { sh """ echo "🚀 Deploying to ${WEB_IP}..." + + # Copy package to web server + scp -o StrictHostKeyChecking=no build.tar.gz deploy@${WEB_IP}:/tmp/build.tar.gz - # Copy build archive - scp -o StrictHostKeyChecking=no build.tar.gz ubuntu@${WEB_IP}:/tmp/build.tar.gz - - # Extract and deploy - ssh -o StrictHostKeyChecking=no ubuntu@${WEB_IP} ' + # Deploy on web server (passwordless sudo required) + ssh -o StrictHostKeyChecking=no deploy@${WEB_IP} ' sudo rm -rf /var/www/reactapp/* sudo mkdir -p /var/www/reactapp sudo tar -xzf /tmp/build.tar.gz -C /var/www/reactapp