Skip to content

Commit

Permalink
Add flag to use new storage settings and apply plugin-template
Browse files Browse the repository at this point in the history
The goal of this is to test the new and legacy settings while
both are still supported.
  • Loading branch information
pedro-psb authored and mdellweg committed Jan 15, 2025
1 parent 34a21c1 commit 8234d4c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .ci/ansible/settings.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ API_ROOT = {{ api_root | repr }}
{% if s3_test | default(false) %}
MEDIA_ROOT: ""
S3_USE_SIGV4 = True
{% if test_storages_compat_layer is defined and test_storages_compat_layer %}
STORAGES = {
"default": {
"BACKEND": "storages.backends.s3boto3.S3Boto3Storage",
Expand All @@ -47,10 +48,19 @@ STORAGES = {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
}
{% else %}
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
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"
{% endif %}
{% 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 = ""
Expand Down
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-417-gcec8e48
2021.08.26-420-gf332a34
1 change: 1 addition & 0 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ minio_access_key: "'$MINIO_ACCESS_KEY'"\
minio_secret_key: "'$MINIO_SECRET_KEY'"\
pulp_scenario_settings: {"DISABLED_authentication_backends": "@merge django.contrib.auth.backends.RemoteUserBackend", "DISABLED_authentication_json_header": "HTTP_X_RH_IDENTITY", "DISABLED_authentication_json_header_jq_filter": ".identity.user.username", "DISABLED_authentication_json_header_openapi_security_scheme": {"description": "External OAuth integration", "flows": {"clientCredentials": {"scopes": {"api.console": "grant_access_to_pulp"}, "tokenUrl": "https://your-identity-provider/token/issuer"}}, "type": "oauth2"}, "DISABLED_rest_framework__default_authentication_classes": "@merge pulpcore.app.authentication.JSONHeaderRemoteAuthentication", "domain_enabled": true, "hide_guarded_distributions": true, "rest_framework__default_permission_classes": ["pulpcore.plugin.access_policy.AccessPolicyFromSettings"]}\
pulp_scenario_env: {}\
test_storages_compat_layer: true\
' vars/main.yaml
export PULP_API_ROOT="/rerouted/djnd/"
fi
Expand Down
1 change: 1 addition & 0 deletions template_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,6 @@ test_lowerbounds: true
test_performance: false
test_reroute: true
test_s3: true
test_storages_compat_layer: true
use_issue_template: true

0 comments on commit 8234d4c

Please sign in to comment.