Jnkinsfile

This commit is contained in:
vriti 2025-06-09 19:39:55 +05:30
parent 9ab30ac27f
commit 6034054e38

6
Jenkinsfile vendored
View File

@ -5,8 +5,8 @@ pipeline {
SSH_CREDENTIALS = 'spurrin-backend-dev'
GIT_CREDENTIALS = 'gitea-cred'
REMOTE_SERVER = 'ubuntu@160.187.166.67'
REPO_HTTPS_URL = 'https://git.tech4biz.wiki/Tech4Biz-Services/spurrin-cleaned-node.git'
BRANCH = 'dev'
REPO_HTTPS_URL = 'https://git.tech4biz.wiki/rohit/spurrin-backend.git'
BRANCH = 'main'
REMOTE_DIR = '/home/ubuntu/spurrin-cleaned-node'
BACKUP_UPLOADS_DIR = '/home/ubuntu/uploads_backup'
@ -70,7 +70,7 @@ stage('Update Repo on Remote') {
else
echo "📥 Repo not found. Cloning fresh and restoring backup..."
rm -rf ${REMOTE_DIR}
git clone -b ${BRANCH} https://${GIT_USER}:${GIT_PASS}@git.tech4biz.wiki/Tech4Biz-Services/spurrin-cleaned-node.git ${REMOTE_DIR}
git clone -b ${BRANCH} https://${GIT_USER}:${GIT_PASS}@https://git.tech4biz.wiki/rohit/spurrin-backend.git ${REMOTE_DIR}
# Restore backup only on fresh clone
if [ -d ${BACKUP_UPLOADS_DIR}/uploads ]; then