From 41173aa97e998314ebceb2c3a1a76392cae08f5a Mon Sep 17 00:00:00 2001 From: chloe Date: Fri, 20 Mar 2026 19:25:40 +0000 Subject: [PATCH] update jenkins --- Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 05ace50..a56fe72 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,6 +58,8 @@ pipeline { set -e cd ${env.DEPLOY_PATH} || mkdir -p ${env.DEPLOY_PATH} && cd ${env.DEPLOY_PATH} + if [ -f .env ]; then cp .env /tmp/.seasoned_env_bak; fi + # Clone or pull the repo (contains docker-compose.yml) if [ -d .git ]; then git fetch origin @@ -66,6 +68,10 @@ pipeline { git clone ${env.GIT_REPO_URL} . fi + if [ -f /tmp/.seasoned_env_bak ]; then mv /tmp/.seasoned_env_bak .env; fi + + if [ ! -f .env ]; then echo "WARNING: .env file is missing on server!"; fi + # Set the image tag for this deployment export IMAGE_TAG=${env.IMAGE_TAG} export DOCKER_REGISTRY=${env.DOCKER_REGISTRY}