From ae493195d971ca6744227591c457e014ac8931c6 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 2 Jun 2024 02:38:59 +0000 Subject: [PATCH] Update CI files [noissue] --- .ci/scripts/collect_changes.py | 8 +- .github/template_gitref | 2 +- .github/workflows/build.yml | 1 + .github/workflows/publish.yml | 23 + .../workflows/scripts/publish_client_pypi.sh | 11 - .github/workflows/test.yml | 3 + CHANGES.md | 306 +++++++++++++ CHANGES.rst | 428 ------------------ CHANGES/.TEMPLATE.md | 39 ++ MANIFEST.in | 2 +- docs/changes.rst | 7 +- pyproject.toml | 10 +- 12 files changed, 388 insertions(+), 452 deletions(-) create mode 100644 CHANGES.md delete mode 100644 CHANGES.rst create mode 100644 CHANGES/.TEMPLATE.md diff --git a/.ci/scripts/collect_changes.py b/.ci/scripts/collect_changes.py index 47856721..d6c6b536 100755 --- a/.ci/scripts/collect_changes.py +++ b/.ci/scripts/collect_changes.py @@ -1,3 +1,4 @@ +#!/bin/env python3 # WARNING: DO NOT EDIT! # # This file was generated by plugin_template, and is managed by it. Please use @@ -8,13 +9,14 @@ import itertools import os import re +import tomllib -import toml from git import GitCommandError, Repo from packaging.version import parse as parse_version # Read Towncrier settings -tc_settings = toml.load("pyproject.toml")["tool"]["towncrier"] +with open("pyproject.toml", "rb") as fp: + tc_settings = tomllib.load(fp)["tool"]["towncrier"] CHANGELOG_FILE = tc_settings.get("filename", "NEWS.rst") START_STRING = tc_settings.get( @@ -79,7 +81,7 @@ def main(): old_length = len(main_changes) for branch in branches: - print(f"Looking at branch {branch}") + print(f"Looking for './{CHANGELOG_FILE}' at branch {branch}") try: changelog = get_changelog(repo, branch) except GitCommandError: diff --git a/.github/template_gitref b/.github/template_gitref index 2232d657..bfe538dd 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-330-g0b7d0c1 +2021.08.26-337-g7c7a09a diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ae9df99..968b41df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,3 +42,4 @@ jobs: path: "pulp-certguard/dist/" if-no-files-found: "error" retention-days: 5 + overwrite: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 14e55012..31f68240 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -89,6 +89,29 @@ jobs: .github/workflows/scripts/install_ruby_client.sh shell: "bash" + - name: "Upload python client packages" + uses: "actions/upload-artifact@v4" + with: + name: "python-client.tar" + path: | + if-no-files-found: "error" + overwrite: true + + - name: "Upload python client docs" + uses: "actions/upload-artifact@v4" + with: + name: "python-client-docs.tar" + path: | + if-no-files-found: "error" + overwrite: true + - name: "Upload ruby client packages" + uses: "actions/upload-artifact@v4" + with: + name: "ruby-client.tar" + path: | + if-no-files-found: "error" + overwrite: true + - name: "Logs" if: always() run: | diff --git a/.github/workflows/scripts/publish_client_pypi.sh b/.github/workflows/scripts/publish_client_pypi.sh index 3f515402..62e49056 100755 --- a/.github/workflows/scripts/publish_client_pypi.sh +++ b/.github/workflows/scripts/publish_client_pypi.sh @@ -18,14 +18,3 @@ if [[ -z "$VERSION" ]]; then echo "No version specified." exit 1 fi - -RESPONSE="$(curl --write-out '%{http_code}' --silent --output /dev/null "https://pypi.org/project/pulp-certguard-client/$VERSION/")" - -if [ "$RESPONSE" == "200" ]; -then - echo "pulp-certguard client $VERSION has already been released. Skipping." - exit -fi - -twine upload -u __token__ -p "$PYPI_API_TOKEN" \ -; diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef487d5b..2b91db3b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -116,6 +116,9 @@ jobs: with: name: "docs.tar" path: "pulp-certguard/docs/docs.tar" + if-no-files-found: "error" + retention-days: 5 + overwrite: true - name: "Logs" if: always() diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 00000000..e91e19d3 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,306 @@ +# Changelog + +[//]: # (You should *NOT* be adding new change log entries to this file, this) +[//]: # (file is managed by towncrier. You *may* edit previous change logs to) +[//]: # (fix problems like typo corrections or such.) +[//]: # (To add a new change log entry, please see the contributing docs.) +[//]: # (WARNING: Don't drop the towncrier directive!) + +[//]: # (towncrier release notes start) + +## 1.8.0 (2024-01-25) {: #1.8.0 } + +### Features + +- Declared pulpcore compatibility up to 3.44. + +--- + +## 1.7.1 (2023-11-03) {: #1.7.1 } + +### Features + +- Declared pulpcore compatibility up to 3.44. + +--- + +## 1.7.0 (2023-10-19) {: #1.7.0 } + +### Bugfixes + +- Allows for compatibility with pulpcore>3.25. + [#252](https://github.com/pulp/pulp-certguard/issues/252) +- Loosened restriction on pyOpenSSL to let us use 23.0 and its fixes. + [#293](https://github.com/pulp/pulp-certguard/issues/293) + +--- + +## 1.6.6 (2023-10-17) {: #1.6.6 } + +### Bugfixes + +- Loosened restriction on pyOpenSSL to let us use 23.0 and its fixes. + [#293](https://github.com/pulp/pulp-certguard/issues/293) + +--- + +## 1.6.5 (2023-05-11) {: #1.6.5 } + +No significant changes. + +--- + +## 1.6.4 (2023-05-04) {: #1.6.4 } + +No significant changes. + +--- + +## 1.6.3 (2023-05-02) {: #1.6.3 } + +### Bugfixes + +- Allows for compatibility with pulpcore>3.25. + [#252](https://github.com/pulp/pulp-certguard/issues/252) + +--- + +## 1.6.2 (2023-05-02) {: #1.6.2 } + +No significant changes. + +--- + +## 1.6.1 (2023-03-23) {: #1.6.1 } + +No significant changes. + +--- + +## 1.6.0 (2023-03-14) {: #1.6.0 } + +### Bugfixes + +- Taught bad-certificate-failures emit warnings to the server-log. + [#145](https://github.com/pulp/pulp-certguard/issues/145) +- Improved the validation of certificates. + [#232](https://github.com/pulp/pulp-certguard/issues/232) + +--- + +## 1.5.9 (2023-10-17) {: #1.5.9 } + +### Bugfixes + +- Loosened restriction on pyOpenSSL to let us use 23.0 and its fixes. + [#293](https://github.com/pulp/pulp-certguard/issues/293) + +--- + +## 1.5.8 (2023-03-03) {: #1.5.8 } + +### Bugfixes + +- Taught bad-certificate-failures emit warnings to the server-log. + [#145](https://github.com/pulp/pulp-certguard/issues/145) + +--- + +## 1.5.7 (2023-02-03) {: #1.5.7 } + +No significant changes. + +--- + +## 1.5.6 (2023-01-31) {: #1.5.6 } + +No significant changes. + +--- + +## 1.5.5 (2022-08-16) {: #1.5.5 } + +No significant changes. + +--- + +## 1.5.4 (2022-08-15) {: #1.5.4 } + +No significant changes. + +--- + +## 1.5.3 (2022-06-23) {: #1.5.3 } + +No significant changes. + +--- + +## 1.5.2 (2021-12-16) {: #1.5.2 } + +### Bugfixes + +- Bumped pulpcore requirement for core/3.17 compatibility. + [#9641](https://pulp.plan.io/issues/9641) + +--- + +## 1.5.1 (2021-10-06) {: #1.5.1 } + +### Bugfixes + +- Bumped pulpcore requirement for core/3.16 compatibility. + [#9494](https://pulp.plan.io/issues/9494) + +--- + +## 1.5.0 (2021-08-04) {: #1.5.0 } + +### Deprecations and Removals + +- Dropped support for Python 3.6 and 3.7. pulp-certguard now supports Python 3.8+. + [#9054](https://pulp.plan.io/issues/9054) + +--- + +## 1.4.0 (2021-06-30) {: #1.4.0 } + +### Features + +- Extended CertGuard.ca_certificate to accept a cert-bundle in addition to a single cert. + [#8783](https://pulp.plan.io/issues/8783) + +--- + +## 1.3.0 (2021-05-19) {: #1.3.0 } + +No significant changes. + +--- + +## 1.2.0 (2021-03-17) {: #1.2.0 } + +No significant changes. + +--- + +## 1.1.0 (2020-12-14) {: #1.1.0 } + +- Adding version-info to pulp_certguard.app.PulpCertGuardPluginAppConfig. +- Making pulp-certguard compatible with pulpcore 3.9. + +--- + +## 1.0.3 (2020-09-25) {: #1.0.3 } + +No significant changes. A compatibility release used to declare compatibility up to pulpcore==3.8. + +--- + +## 1.0.2 (2020-08-18) {: #1.0.2 } + +No significant changes. + +--- + +## 1.0.1 (2020-07-20) {: #1.0.1 } + +### Bugfixes + +- Making pulp-certguard compatible with pulpcore 3.5 + [#7177](https://pulp.plan.io/issues/7177) + +--- + +## 1.0.0 (2020-07-01) {: #1.0.0 } + +No significant changes. + +--- + +## 0.1.0rc5 (2020-05-22) + +### Features + +- Add support for non-urlencoded certificates to allow Apache < 2.6.10 reverse proxies to also work. + [#6574](https://pulp.plan.io/issues/6574) + +### Bugfixes + +- RHSMCertGuard now only checks for authorized URLs in the client cert against the + `Distribution.base_path` and disincludes the `settings.CONTENT_PATH_PREFIX`, e.g. + `/pulp/content/` + [#6694](https://pulp.plan.io/issues/6694) + +### Improved Documentation + +- Adds docs on configuring Apache 2.6.10+ and < 2.6.10 docs, which need different configs. + [#6574](https://pulp.plan.io/issues/6574) +- Adds documentation on RHSM path checking with examples. Also adds a debugging section on inspecting + RHSM certificates with the `rct` command. + [#6694](https://pulp.plan.io/issues/6694) +- Adds debugging documentation on how users can enable, use, and interpret the debugging logging. + [#6744](https://pulp.plan.io/issues/6744) + +--- + +## 0.1.0rc4 (2020-04-22) + +### Features + +- Adds RHSMCertGuard which offers both content protection and path-based entitlement checking. + [#4664](https://pulp.plan.io/issues/4664) +- Make repositories "typed". Repositories now live at a detail endpoint. Sync is performed by POSTing to {repo_href}/sync/ remote={remote_href}. + [#5625](https://pulp.plan.io/issues/5625) +- `X509CertGuard.ca_certificate` is now stored in the database and not on the filesystem. + [#6352](https://pulp.plan.io/issues/6352) + +### Improved Documentation + +- Adds documentation on how authorization checking works and that there are two types of Certguards + now. + [#4664](https://pulp.plan.io/issues/4664) +- Move documentation from README.md to sphinx site to show on + [#6298](https://pulp.plan.io/issues/6298) +- Total rewrite of the documentation with tested reverse proxy examples, X509 Cert Guard usage, and + RHSM Cert Guard usage. + [#6445](https://pulp.plan.io/issues/6445) +- Adds notes to docs that to use RHSMCertGuard you have to install rhsm Python module. + [#6546](https://pulp.plan.io/issues/6546) + +### Deprecations and Removals + +- Renames the `SSL_CLIENT_CERTIFICATE` to be `X-CLIENT-CERT`. + [#4891](https://pulp.plan.io/issues/4891) + +- Change _id, _created, _last_updated, _href to pulp_id, pulp_created, pulp_last_updated, pulp_href + [#5457](https://pulp.plan.io/issues/5457) + +- Sync is no longer available at the {remote_href}/sync/ repository={repo_href} endpoint. + [#5625](https://pulp.plan.io/issues/5625) + +- Migrations had to be regenerated from scratch due to a backwards incompatible change where + `X509ContentGuard.ca_certificate` is now stored in the database and not on the filesystem. Users + who have already run migrations will need to drop the `RHSMCertGuard` and `X509CertGuard` tables + manually from their databases, reapply migrations, and re-create their CertGuard objects. + + Also the submission of the client cert to the content app occurs via the X-CLIENT-CERT header, and + is expected to be urlencoded. + [#6352](https://pulp.plan.io/issues/6352) + +### Misc + +- [#6105](https://pulp.plan.io/issues/6105), [#6296](https://pulp.plan.io/issues/6296), [#6424](https://pulp.plan.io/issues/6424), [#6545](https://pulp.plan.io/issues/6545) + +--- + +## 0.1.0rc2 (2019-09-20) + +### Improved Documentation + +- Switch to using [towncrier](https://github.com/hawkowl/towncrier) for better release notes. + [#4875](https://pulp.plan.io/issues/4875) + +### Misc + +- [#4681](https://pulp.plan.io/issues/4681) diff --git a/CHANGES.rst b/CHANGES.rst deleted file mode 100644 index ca5ad825..00000000 --- a/CHANGES.rst +++ /dev/null @@ -1,428 +0,0 @@ -========= -Changelog -========= - -.. - You should *NOT* be adding new change log entries to this file, this - file is managed by towncrier. You *may* edit previous change logs to - fix problems like typo corrections or such. - To add a new change log entry, please see - https://docs.pulpproject.org/en/3.0/nightly/contributing/git.html#changelog-update - - WARNING: Don't drop the next directive! - -.. towncrier release notes start - -1.8.0 (2024-01-25) -================== - -Features --------- - -- Declared pulpcore compatibility up to 3.44. - - - ----- - - -1.7.1 (2023-11-03) -================== - -Features --------- - -- Declared pulpcore compatibility up to 3.44. - - ----- - - -1.7.0 (2023-10-19) -================== - -Bugfixes --------- - -- Allows for compatibility with pulpcore>3.25. - `#252 `__ -- Loosened restriction on pyOpenSSL to let us use 23.0 and its fixes. - `#293 `__ - - ----- - - -1.6.6 (2023-10-17) -================== - -Bugfixes --------- - -- Loosened restriction on pyOpenSSL to let us use 23.0 and its fixes. - `#293 `__ - - ----- - - -1.6.5 (2023-05-11) -================== - -No significant changes. - - ----- - - -1.6.4 (2023-05-04) -================== - -No significant changes. - - ----- - - -1.6.3 (2023-05-02) -================== - -Bugfixes --------- - -- Allows for compatibility with pulpcore>3.25. - `#252 `__ - - ----- - - -1.6.2 (2023-05-02) -================== - -No significant changes. - - ----- - - -1.6.1 (2023-03-23) -================== - -No significant changes. - - ----- - - -1.6.0 (2023-03-14) -================== - -Bugfixes --------- - -- Taught bad-certificate-failures emit warnings to the server-log. - `#145 `__ -- Improved the validation of certificates. - `#232 `__ - - ----- - - -1.5.9 (2023-10-17) -================== - -Bugfixes --------- - -- Loosened restriction on pyOpenSSL to let us use 23.0 and its fixes. - `#293 `__ - - ----- - - -1.5.8 (2023-03-03) -================== - -Bugfixes --------- - -- Taught bad-certificate-failures emit warnings to the server-log. - `#145 `__ - - ----- - - -1.5.7 (2023-02-03) -================== - -No significant changes. - - ----- - - -1.5.6 (2023-01-31) -================== - -No significant changes. - - ----- - - -1.5.5 (2022-08-16) -================== - -No significant changes. - - ----- - - -1.5.4 (2022-08-15) -================== - -No significant changes. - - ----- - - -1.5.3 (2022-06-23) -================== - -No significant changes. - - ----- - - -1.5.2 (2021-12-16) -================== - -Bugfixes --------- - -- Bumped pulpcore requirement for core/3.17 compatibility. - `#9641 `_ - - ----- - - -1.5.1 (2021-10-06) -================== - -Bugfixes --------- - -- Bumped pulpcore requirement for core/3.16 compatibility. - `#9494 `_ - - ----- - - -1.5.0 (2021-08-04) -================== - -Deprecations and Removals -------------------------- - -- Dropped support for Python 3.6 and 3.7. pulp-certguard now supports Python 3.8+. - `#9054 `_ - - ----- - - -1.4.0 (2021-06-30) -================== - -Features --------- - -- Extended CertGuard.ca_certificate to accept a cert-bundle in addition to a single cert. - `#8783 `_ - - ----- - - -1.3.0 (2021-05-19) -================== - -No significant changes. - - ----- - - -1.2.0 (2021-03-17) -================== - -No significant changes. - - ----- - - -1.1.0 (2020-12-14) -================== - -- Adding version-info to `pulp_certguard.app.PulpCertGuardPluginAppConfig`. -- Making pulp-certguard compatible with pulpcore 3.9. - - ----- - -1.0.3 (2020-09-25) -================== - -No significant changes. A compatibility release used to declare compatibility up to pulpcore==3.8. - - ----- - - -1.0.2 (2020-08-18) -================== - -No significant changes. - - ----- - - -1.0.1 (2020-07-20) -================== - -Bugfixes --------- - -- Making pulp-certguard compatible with pulpcore 3.5 - `#7177 `_ - - ----- - - -1.0.0 (2020-07-01) -================== - -No significant changes. - - ----- - - -0.1.0rc5 (2020-05-22) -===================== - -Features --------- - -- Add support for non-urlencoded certificates to allow Apache < 2.6.10 reverse proxies to also work. - `#6574 `_ - - -Bugfixes --------- - -- RHSMCertGuard now only checks for authorized URLs in the client cert against the - ``Distribution.base_path`` and disincludes the ``settings.CONTENT_PATH_PREFIX``, e.g. - ``/pulp/content/`` - `#6694 `_ - - -Improved Documentation ----------------------- - -- Adds docs on configuring Apache 2.6.10+ and < 2.6.10 docs, which need different configs. - `#6574 `_ -- Adds documentation on RHSM path checking with examples. Also adds a debugging section on inspecting - RHSM certificates with the ``rct`` command. - `#6694 `_ -- Adds debugging documentation on how users can enable, use, and interpret the debugging logging. - `#6744 `_ - - ----- - - -0.1.0rc4 (2020-04-22) -===================== - -Features --------- - -- Adds RHSMCertGuard which offers both content protection and path-based entitlement checking. - `#4664 `_ -- Make repositories "typed". Repositories now live at a detail endpoint. Sync is performed by POSTing to {repo_href}/sync/ remote={remote_href}. - `#5625 `_ -- ``X509CertGuard.ca_certificate`` is now stored in the database and not on the filesystem. - `#6352 `_ - - -Improved Documentation ----------------------- - -- Adds documentation on how authorization checking works and that there are two types of Certguards - now. - `#4664 `_ -- Move documentation from README.md to sphinx site to show on https://pulp-certguard.readthedocs.io/ - `#6298 `_ -- Total rewrite of the documentation with tested reverse proxy examples, X509 Cert Guard usage, and - RHSM Cert Guard usage. - `#6445 `_ -- Adds notes to docs that to use RHSMCertGuard you have to install `rhsm` Python module. - `#6546 `_ - - -Deprecations and Removals -------------------------- - -- Renames the ``SSL_CLIENT_CERTIFICATE`` to be ``X-CLIENT-CERT``. - `#4891 `_ -- Change `_id`, `_created`, `_last_updated`, `_href` to `pulp_id`, `pulp_created`, `pulp_last_updated`, `pulp_href` - `#5457 `_ -- Sync is no longer available at the {remote_href}/sync/ repository={repo_href} endpoint. - `#5625 `_ -- Migrations had to be regenerated from scratch due to a backwards incompatible change where - ``X509ContentGuard.ca_certificate`` is now stored in the database and not on the filesystem. Users - who have already run migrations will need to drop the ``RHSMCertGuard`` and ``X509CertGuard`` tables - manually from their databases, reapply migrations, and re-create their CertGuard objects. - - Also the submission of the client cert to the content app occurs via the `X-CLIENT-CERT` header, and - is expected to be urlencoded. - `#6352 `_ - - -Misc ----- - -- `#6105 `_, `#6296 `_, `#6424 `_, `#6545 `_ - - ----- - - -0.1.0rc2 (2019-09-20) -===================== - -Improved Documentation ----------------------- - -- Switch to using `towncrier `_ for better release notes. - `#4875 `_ - - -Misc ----- - -- `#4681 `_ - diff --git a/CHANGES/.TEMPLATE.md b/CHANGES/.TEMPLATE.md new file mode 100644 index 00000000..2308193b --- /dev/null +++ b/CHANGES/.TEMPLATE.md @@ -0,0 +1,39 @@ +{# TOWNCRIER TEMPLATE #} +{% for section, _ in sections.items() %} +{%- set section_slug = "-" + section|replace(" ", "-")|replace("_", "-")|lower %} +{%- if section %} + +### {{section}} {: #{{versiondata.version}}{{section_slug}} } +{% else %} +{%- set section_slug = "" %} +{% endif %} +{% if sections[section] %} +{% for category, val in definitions.items() if category in sections[section]%} + +#### {{ definitions[category]['name'] }} {: #{{versiondata.version}}{{section_slug}}-{{category}} } + +{% if definitions[category]['showcontent'] %} +{% for text, values in sections[section][category].items() %} +- {{ text }} +{% if values %} + {{ values|join(',\n ') }} +{% endif %} +{% endfor %} +{% else %} +- {{ sections[section][category]['']|join(', ') }} +{% endif %} +{% if sections[section][category]|length == 0 %} + +No significant changes. +{% else %} +{% endif %} +{% endfor %} +{% else %} + +No significant changes. +{% endif %} +{% endfor %} + +--- + + diff --git a/MANIFEST.in b/MANIFEST.in index dee58fbc..d00e6cdd 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ include LICENSE include requirements.txt -include CHANGES.rst +include CHANGES.md include COMMITMENT include COPYRIGHT include ci_requirements.txt diff --git a/docs/changes.rst b/docs/changes.rst index 53648734..96e8eb90 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -1,5 +1,4 @@ -.. _pulp_certguard-changes: +Changes +********* -.. include:: ../CHANGES.rst - -.. include:: ../HISTORY.rst +Removed due to docs migration process. diff --git a/pyproject.toml b/pyproject.toml index 1d2f39aa..9e67f695 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,11 +6,13 @@ requires = [ build-backend = 'setuptools.build_meta' [tool.towncrier] -filename = "CHANGES.rst" +filename = "CHANGES.md" directory = "CHANGES/" -title_format = "{version} ({project_date})" -template = "CHANGES/.TEMPLATE.rst" -issue_format = "`#{issue} `__" +title_format = "## {version} ({project_date}) {{: #{version} }}" +template = "CHANGES/.TEMPLATE.md" +issue_format = "[#{issue}](https://github.com/pulp/pulp-certguard/issues/{issue})" +start_string = "[//]: # (towncrier release notes start)\n" +underlines = ["", "", ""] [tool.check-manifest] ignore = [