Update Jenkinsfile
This commit is contained in:
parent
f3109f2b47
commit
97ff8a2058
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -7,7 +7,7 @@ pipeline {
|
|||||||
PROJECT_NAME = 'Royal-Enfield-Backend'
|
PROJECT_NAME = 'Royal-Enfield-Backend'
|
||||||
DEPLOY_PATH = '/home/ubuntu/Royal-Enfield/Re_Backend'
|
DEPLOY_PATH = '/home/ubuntu/Royal-Enfield/Re_Backend'
|
||||||
GIT_CREDENTIALS = 'git-cred'
|
GIT_CREDENTIALS = 'git-cred'
|
||||||
REPO_URL = 'https://git.tech4biz.wiki/yasha/cognitive-prism-academia-backend.git'
|
REPO_URL = 'https://git.tech4biz.wiki/laxmanhalaki/Re_Backend.git'
|
||||||
GIT_BRANCH = 'main'
|
GIT_BRANCH = 'main'
|
||||||
NPM_PATH = '/home/ubuntu/.nvm/versions/node/v22.21.1/bin/npm'
|
NPM_PATH = '/home/ubuntu/.nvm/versions/node/v22.21.1/bin/npm'
|
||||||
NODE_PATH = '/home/ubuntu/.nvm/versions/node/v22.21.1/bin/node'
|
NODE_PATH = '/home/ubuntu/.nvm/versions/node/v22.21.1/bin/node'
|
||||||
@ -58,7 +58,7 @@ if [ -d "${DEPLOY_PATH}/.git" ]; then
|
|||||||
git config credential.helper store
|
git config credential.helper store
|
||||||
|
|
||||||
echo "Fetching updates..."
|
echo "Fetching updates..."
|
||||||
git fetch https://${GIT_USER}:${GIT_PASS}@git.tech4biz.wiki/yasha/cognitive-prism-academia-backend.git ${GIT_BRANCH}
|
git fetch https://${GIT_USER}:${GIT_PASS}@git.tech4biz.wiki/laxmanhalaki/Re_Backend.git ${GIT_BRANCH}
|
||||||
|
|
||||||
CURRENT_COMMIT=\$(git rev-parse HEAD)
|
CURRENT_COMMIT=\$(git rev-parse HEAD)
|
||||||
LATEST_COMMIT=\$(git rev-parse FETCH_HEAD)
|
LATEST_COMMIT=\$(git rev-parse FETCH_HEAD)
|
||||||
@ -77,7 +77,7 @@ else
|
|||||||
rm -rf ${DEPLOY_PATH}
|
rm -rf ${DEPLOY_PATH}
|
||||||
mkdir -p /home/ubuntu/Royal-Enfield
|
mkdir -p /home/ubuntu/Royal-Enfield
|
||||||
cd /home/ubuntu/Royal-Enfield
|
cd /home/ubuntu/Royal-Enfield
|
||||||
git clone https://${GIT_USER}:${GIT_PASS}@git.tech4biz.wiki/yasha/cognitive-prism-academia-backend.git Re_Backend
|
git clone https://${GIT_USER}:${GIT_PASS}@git.tech4biz.wiki/laxmanhalaki/Re_Backend.git Re_Backend
|
||||||
cd ${DEPLOY_PATH}
|
cd ${DEPLOY_PATH}
|
||||||
git checkout ${GIT_BRANCH}
|
git checkout ${GIT_BRANCH}
|
||||||
git config --global --add safe.directory ${DEPLOY_PATH}
|
git config --global --add safe.directory ${DEPLOY_PATH}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user