jenkins, automation tst2
This commit is contained in:
parent
567da81bbe
commit
4ea308aa18
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -57,7 +57,7 @@ pipeline {
|
||||
else
|
||||
echo "📥 Repo not found. Cloning fresh and restoring backup..."
|
||||
rm -rf ${REMOTE_DIR}
|
||||
git clone -b ${BRANCH} https://${GIT_USER}:${GIT_PASS}@${REPO_HTTPS_URL#https://} ${REMOTE_DIR}
|
||||
git clone -b ${BRANCH} https://${GIT_USER}:${GIT_PASS}@git.tech4biz.wiki/rohit/spurrin-cleaned-backend-dev.git ${REMOTE_DIR}
|
||||
|
||||
[ -d ${BACKUP_UPLOADS_DIR}/uploads ] && cp -a ${BACKUP_UPLOADS_DIR}/uploads ${REMOTE_DIR}/
|
||||
[ -d ${BACKUP_UPLOADS_DIR}/hospital_data ] && cp -a ${BACKUP_UPLOADS_DIR}/hospital_data ${REMOTE_DIR}/
|
||||
@ -103,14 +103,14 @@ pipeline {
|
||||
success {
|
||||
echo '✅ Deployment successful!'
|
||||
mail to: "${NOTIFY_EMAIL}",
|
||||
subject: "✅ Jenkins - spurrin-cleaned-node Deployment Successful",
|
||||
subject: '✅ Jenkins - spurrin-cleaned-node Deployment Successful',
|
||||
body: "The deployment of spurrin-cleaned-node to ${REMOTE_SERVER} was successful.\n\nRegards,\nJenkins"
|
||||
}
|
||||
|
||||
failure {
|
||||
echo '❌ Deployment failed!'
|
||||
mail to: "${NOTIFY_EMAIL}",
|
||||
subject: "❌ Jenkins - spurrin-cleaned-node Deployment Failed",
|
||||
subject: '❌ Jenkins - spurrin-cleaned-node Deployment Failed',
|
||||
body: "The deployment of spurrin-cleaned-node to ${REMOTE_SERVER} failed. Please check Jenkins logs.\n\nRegards,\nJenkins"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user