From 91620802d0382a6baa5232a1406f96e52f05e3ac Mon Sep 17 00:00:00 2001 From: Christoph Brandau Date: Tue, 30 Jun 2026 16:02:03 +0200 Subject: [PATCH] Normalize S3 bucket name to lowercase S3 and MinIO bucket naming conventions require names to be lowercase. This change ensures that the bucket name derived from the `S3_BUCKET` environment variable (or default) is always converted to lowercase, preventing potential configuration errors. --- cicd_tool/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cicd_tool/main.py b/cicd_tool/main.py index 10341f1..4aa442e 100644 --- a/cicd_tool/main.py +++ b/cicd_tool/main.py @@ -183,7 +183,9 @@ def main(version: Optional[str] = None, app_dir: Optional[str] = None) -> None: if not artifact_base_url: raise ConfigurationError("ARTIFACT_BASE_URL is required") - bucket_name = os.environ.get("S3_BUCKET", "gitlite") + # S3/MinIO bucket names must be lowercase, so normalise regardless of how the + # S3_BUCKET variable is cased (e.g. "GitLite" -> "gitlite"). + bucket_name = (os.environ.get("S3_BUCKET") or "gitlite").lower() bucket_prefix = (app_dir or os.environ.get("APP_DIR") or "gitlite").strip("/") artifacts = _collect_artifacts()