forked from rohit/spurrin-backend
Jnkinsfile
This commit is contained in:
parent
9ab30ac27f
commit
6034054e38
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user