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'
|
SSH_CREDENTIALS = 'spurrin-backend-dev'
|
||||||
GIT_CREDENTIALS = 'gitea-cred'
|
GIT_CREDENTIALS = 'gitea-cred'
|
||||||
REMOTE_SERVER = 'ubuntu@160.187.166.67'
|
REMOTE_SERVER = 'ubuntu@160.187.166.67'
|
||||||
REPO_HTTPS_URL = 'https://git.tech4biz.wiki/Tech4Biz-Services/spurrin-cleaned-node.git'
|
REPO_HTTPS_URL = 'https://git.tech4biz.wiki/rohit/spurrin-backend.git'
|
||||||
BRANCH = 'dev'
|
BRANCH = 'main'
|
||||||
|
|
||||||
REMOTE_DIR = '/home/ubuntu/spurrin-cleaned-node'
|
REMOTE_DIR = '/home/ubuntu/spurrin-cleaned-node'
|
||||||
BACKUP_UPLOADS_DIR = '/home/ubuntu/uploads_backup'
|
BACKUP_UPLOADS_DIR = '/home/ubuntu/uploads_backup'
|
||||||
@ -70,7 +70,7 @@ stage('Update Repo on Remote') {
|
|||||||
else
|
else
|
||||||
echo "📥 Repo not found. Cloning fresh and restoring backup..."
|
echo "📥 Repo not found. Cloning fresh and restoring backup..."
|
||||||
rm -rf ${REMOTE_DIR}
|
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
|
# Restore backup only on fresh clone
|
||||||
if [ -d ${BACKUP_UPLOADS_DIR}/uploads ]; then
|
if [ -d ${BACKUP_UPLOADS_DIR}/uploads ]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user