From f18b98212f571d61206a6995b0fbae3ec72b19f2 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Fri, 13 Dec 2024 17:28:04 -0300 Subject: [PATCH] Update CI settings to partially use new storage settings --- .ci/ansible/settings.py.j2 | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.ci/ansible/settings.py.j2 b/.ci/ansible/settings.py.j2 index 4ed28f42ad..4a7cc2ad9e 100644 --- a/.ci/ansible/settings.py.j2 +++ b/.ci/ansible/settings.py.j2 @@ -27,19 +27,30 @@ API_ROOT = {{ api_root | repr }} {% endif %} {% if s3_test | default(false) %} -DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" -MEDIA_ROOT = "" -AWS_ACCESS_KEY_ID = "{{ minio_access_key }}" -AWS_SECRET_ACCESS_KEY = "{{ minio_secret_key }}" -AWS_S3_REGION_NAME = "eu-central-1" -AWS_S3_ADDRESSING_STYLE = "path" +MEDIA_ROOT: "" S3_USE_SIGV4 = True -AWS_S3_SIGNATURE_VERSION = "s3v4" -AWS_STORAGE_BUCKET_NAME = "pulp3" -AWS_S3_ENDPOINT_URL = "http://minio:9000" -AWS_DEFAULT_ACL = "@none None" +STORAGES = { + "default": { + "BACKEND": "storages.backends.s3boto3.S3Boto3Storage", + "OPTIONS": { + "AWS_ACCESS_KEY_ID": "{{ minio_access_key }}" + "AWS_SECRET_ACCESS_KEY": "{{ minio_secret_key }}" + "AWS_S3_REGION_NAME": "eu-central-1" + "AWS_S3_ADDRESSING_STYLE": "path" + "AWS_S3_SIGNATURE_VERSION": "s3v4" + "AWS_STORAGE_BUCKET_NAME": "pulp3" + "AWS_S3_ENDPOINT_URL": "http://minio:9000" + "AWS_DEFAULT_ACL": "@none None" + }, + }, + "staticfiles": { + "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", + }, +} {% endif %} +# This is using DEFAULT_FILE_STORAGE to test both usages. +# Remove when DEFAULT_FILE_STORAGE is completely removed. {% if azure_test | default(false) %} DEFAULT_FILE_STORAGE = "storages.backends.azure_storage.AzureStorage" MEDIA_ROOT = ""