From 8d04a945b01bc4473c0123ae253a30c249982a79 Mon Sep 17 00:00:00 2001 From: AlexeerCT Date: Thu, 2 Apr 2026 10:08:59 -0500 Subject: [PATCH] Enhance Jenkinsfile to handle multiple requirements files. Added conditional checks to install dependencies from either requirements.txt or base.txt, with error handling for missing files. --- Jenkinsfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index df4af8f4..0af8f6ef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -94,7 +94,16 @@ pipeline { set -euxo pipefail python --version python -m pip install --upgrade pip - pip install -r /workspace/backend/requirements.txt + if [ -f /workspace/backend/requirements.txt ]; then + pip install -r /workspace/backend/requirements.txt + elif [ -f /workspace/backend/requirements/base.txt ]; then + pip install -r /workspace/backend/requirements/base.txt + else + echo "ERROR: No requirements file found in /workspace/backend" + ls -la /workspace/backend || true + ls -la /workspace/backend/requirements || true + exit 1 + fi cd /workspace/backend alembic upgrade head pytest -q tests -v -ra -s