Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .ci/scripts/clean_gh_release_notes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env python3
# This script is running with elevated privileges from the main branch against pull requests.
#
# It cleans the input from artifacts which are used by the pulp documentation internally,
# but clutter for GitHub releases

import sys

NOTE = """
> [!NOTE]
> Official changes are available on [Pulp docs]({docs_url})\
"""


def main():
plugin_name = sys.argv[1]
version_str = sys.argv[2]
docs_url = f"https://pulpproject.org/{plugin_name}/changes/#{version_str}"
note_added = False
for line in sys.stdin:
if line.endswith("\n"):
line = line[:-1]
if line.startswith("#"):
print(line.split(" {: #")[0])
if not note_added and version_str in line:
print(NOTE.format(docs_url=docs_url))
note_added = True
else:
print(line)


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
run: |
# The last commit before the release commit contains the release CHANGES fragments
git checkout "${TAG_NAME}~"
NOTES=$(towncrier build --draft --version $TAG_NAME)
NOTES=$(towncrier build --draft --version $TAG_NAME | .ci/scripts/clean_gh_release_notes.py pulpcore $TAG_NAME)
echo "body<<EOF" >> $GITHUB_OUTPUT
echo "$NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ VARSYAML

cat >> vars/main.yaml << VARSYAML
pulp_env: {"PULP_CA_BUNDLE": "/etc/pulp/certs/pulp_webserver.crt"}
pulp_settings: {"allowed_export_paths": ["/tmp"], "allowed_import_paths": ["/tmp"], "content_path_prefix": "/somewhere/else/", "csrf_trusted_origins": ["https://pulp:443"], "orphan_protection_time": 0, "task_protection_time": 10, "tmpfile_protection_time": 10, "upload_protection_time": 10}
pulp_settings: {"allowed_export_paths": ["/tmp"], "allowed_import_paths": ["/tmp"], "content_path_prefix": "/somewhere/else/", "csrf_trusted_origins": ["https://pulp:443"], "orphan_protection_time": 0, "task_diagnostics": ["memory"], "task_protection_time": 10, "tmpfile_protection_time": 10, "upload_protection_time": 10}
pulp_scheme: https
pulp_default_container: ghcr.io/pulp/pulp-ci-centos9:latest
VARSYAML
Expand Down Expand Up @@ -122,7 +122,7 @@ if [ "$TEST" = "azure" ]; then
- ./azurite:/etc/pulp\
command: "azurite-blob --skipApiVersionCheck --blobHost 0.0.0.0"' vars/main.yaml
sed -i -e '$a azure_test: true\
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"}}, "api_root_rewrite_header": "X-API-Root", "content_origin": null, "domain_enabled": true, "rest_framework__default_authentication_classes": "@merge pulpcore.app.authentication.PulpRemoteUserAuthentication", "rest_framework__default_permission_classes": ["pulpcore.plugin.access_policy.DefaultAccessPolicy"], "task_diagnostics": ["memory"]}\
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"}}, "api_root_rewrite_header": "X-API-Root", "content_origin": null, "domain_enabled": true, "rest_framework__default_authentication_classes": "@merge pulpcore.app.authentication.PulpRemoteUserAuthentication", "rest_framework__default_permission_classes": ["pulpcore.plugin.access_policy.DefaultAccessPolicy"]}\
pulp_scenario_env: {}\
' vars/main.yaml
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ fi
export PULP_FIXTURES_URL="http://pulp-fixtures:8080"
pushd ../pulp-cli
pip install -r test_requirements.txt
pytest -v -m "pulpcore or pulp_file or pulp_certguard"
pytest -v tests -m "pulpcore or pulp_file or pulp_certguard"
popd

if [ -f "$POST_SCRIPT" ]; then
Expand Down
4 changes: 2 additions & 2 deletions template_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ pulp_settings:
task_protection_time: 10
tmpfile_protection_time: 10
upload_protection_time: 10
task_diagnostics:
- "memory"
pulp_settings_azure:
MEDIA_ROOT: ""
STORAGES:
Expand All @@ -84,8 +86,6 @@ pulp_settings_azure:
rest_framework__default_authentication_classes: "@merge pulpcore.app.authentication.PulpRemoteUserAuthentication"
rest_framework__default_permission_classes:
- "pulpcore.plugin.access_policy.DefaultAccessPolicy"
task_diagnostics:
- "memory"
pulp_settings_gcp: null
pulp_settings_s3:
DISABLED_authentication_backends: "@merge django.contrib.auth.backends.RemoteUserBackend"
Expand Down