Skip to content

Commit 7bf6707

Browse files
gerrod3cursoragent
andcommitted
Migrate to Django 5 STORAGES
Assisted by: cursor composer-1.5 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c01d84f commit 7bf6707

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ if [ "$TEST" = "azure" ]; then
109109
- ./azurite:/etc/pulp\
110110
command: "azurite-blob --skipApiVersionCheck --blobHost 0.0.0.0"' vars/main.yaml
111111
sed -i -e '$a azure_test: true\
112-
pulp_scenario_settings: {"AZURE_ACCOUNT_KEY": "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==", "AZURE_ACCOUNT_NAME": "devstoreaccount1", "AZURE_CONNECTION_STRING": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1;", "AZURE_CONTAINER": "pulp-test", "AZURE_LOCATION": "pulp3", "AZURE_OVERWRITE_FILES": true, "AZURE_URL_EXPIRATION_SECS": 120, "DEFAULT_FILE_STORAGE": "storages.backends.azure_storage.AzureStorage", "MEDIA_ROOT": "", "content_origin": null, "domain_enabled": true}\
112+
pulp_scenario_settings: {"MEDIA_ROOT": "", "STORAGES": {"default": {"BACKEND": "storages.backends.azure_storage.AzureStorage", "OPTIONS": {"account_key": "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==", "account_name": "devstoreaccount1", "azure_container": "pulp-test", "connection_string": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1;", "expiration_secs": 120, "location": "pulp3", "overwrite_files": true}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}, "content_origin": null}\
113113
pulp_scenario_env: {}\
114114
' vars/main.yaml
115115
fi

template_config.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,21 @@ pulp_settings:
4848
orphan_protection_time: 0
4949
pypi_api_hostname: "https://pulp:443"
5050
pulp_settings_azure:
51-
AZURE_ACCOUNT_KEY: "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="
52-
AZURE_ACCOUNT_NAME: "devstoreaccount1"
53-
AZURE_CONNECTION_STRING: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1;"
54-
AZURE_CONTAINER: "pulp-test"
55-
AZURE_LOCATION: "pulp3"
56-
AZURE_OVERWRITE_FILES: true
57-
AZURE_URL_EXPIRATION_SECS: 120
58-
DEFAULT_FILE_STORAGE: "storages.backends.azure_storage.AzureStorage"
5951
MEDIA_ROOT: ""
52+
STORAGES:
53+
default:
54+
BACKEND: "storages.backends.azure_storage.AzureStorage"
55+
OPTIONS:
56+
account_key: "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="
57+
account_name: "devstoreaccount1"
58+
azure_container: "pulp-test"
59+
connection_string: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1;"
60+
expiration_secs: 120
61+
location: "pulp3"
62+
overwrite_files: true
63+
staticfiles:
64+
BACKEND: "django.contrib.staticfiles.storage.StaticFilesStorage"
6065
content_origin: null
61-
domain_enabled: true
6266
pulp_settings_gcp: null
6367
pulp_settings_s3:
6468
MEDIA_ROOT: ""

0 commit comments

Comments
 (0)