Trigger fresh Jenkins build

This commit is contained in:
VIPIN 2025-08-28 23:52:50 +05:30
parent 93e6864431
commit 5f76f60520

8
Jenkinsfile vendored
View File

@ -58,13 +58,15 @@ pipeline {
stage('Deploy') {
steps {
script {
// Use sshagent in a script block
sshagent([env.SSH_CRED]) {
sh """
echo "🚀 Deploying to ${WEB_IP}..."
scp -o StrictHostKeyChecking=no build.tar.gz deploy@${WEB_IP}:/tmp/build.tar.gz
ssh -o StrictHostKeyChecking=no deploy@${WEB_IP} '
# 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} '
sudo rm -rf /var/www/reactapp/*
sudo mkdir -p /var/www/reactapp
sudo tar -xzf /tmp/build.tar.gz -C /var/www/reactapp