diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7e4471e..2f304c8a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v4 with: - python-version: "3.8" + python-version: "3.11" - name: "Bootstrap catdog plugin" working-directory: "plugin_template" run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98119105..8cbf41af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: fetch-depth: 0 - uses: "actions/setup-python@v4" with: - python-version: "3.8" + python-version: "3.11" - name: "Bootstrap catdog plugin" working-directory: "plugin_template" run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5a8f1e71..c88c360c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 - uses: "actions/setup-python@v4" with: - python-version: "3.8" + python-version: "3.11" - name: "Lint plugin_template" working-directory: "plugin_template" run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 703a74cf..8e901736 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: - uses: "actions/setup-python@v4" with: - python-version: "3.8" + python-version: "3.11" - name: "Bootstrap catdog plugin" working-directory: "plugin_template" diff --git a/README.md b/README.md index 68d0a629..aa8f9394 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,8 @@ The following settings are stored in `template_config.yml`. pydocstyle Boolean, whether to have flake8 use pydocstyle to check for compliance with Python docstring conventions. - python_version Python version to use in the CI. Currently only 3.6 and 3.8 are supported. + python_version Python version to use in the CI. This does not affect the python version + inside the CI container. release_user The GitHub user that is associated with the RELEASE_TOKEN secret on GitHub. The username and token are used to push the Changelog and version bump commits diff --git a/plugin-template b/plugin-template index 28422c84..e8d8c7d7 100755 --- a/plugin-template +++ b/plugin-template @@ -27,7 +27,7 @@ DEFAULT_SETTINGS = { "check_stray_pulpcore_imports": True, "cli_package": "pulp-cli", "cli_repo": "https://github.com/pulp/pulp-cli.git", - "ci_base_image": "ghcr.io/pulp/pulp-ci-centos", + "ci_base_image": "ghcr.io/pulp/pulp-ci-centos9", "ci_env": {}, "ci_trigger": "{pull_request: {branches: ['*']}}", "ci_update_docs": False, @@ -67,7 +67,6 @@ DEFAULT_SETTINGS = { "pulp_settings": None, "pulp_settings_s3": None, "pydocstyle": True, - "python_version": "3.8", "release_email": "pulp-infra@redhat.com", "release_user": "pulpbot", "stalebot_days_until_close": 30, @@ -416,6 +415,7 @@ def write_template_section(config, name, plugin_root_dir, verbose=False): "section": name, "gitref": gitref, "ci_update_branches": ci_update_branches, + "python_version": "3.11", **config, } diff --git a/templates/bootstrap/setup.py.j2 b/templates/bootstrap/setup.py.j2 index b462b83e..105748d8 100755 --- a/templates/bootstrap/setup.py.j2 +++ b/templates/bootstrap/setup.py.j2 @@ -9,11 +9,13 @@ setup( name="{{ plugin_name | dash }}", version="0.1.0a1.dev", description="{{ plugin_name | dash }} plugin for the Pulp Project", + long_description="{{ plugin_name | dash }} plugin for the Pulp Project", + long_description_content_type="text/markdown", license="GPLv2+", author="AUTHOR", author_email="author@email.here", url="http://example.com/", - python_requires=">=3.8", + python_requires=">=3.9", install_requires=requirements, extra_require={"ci": []}, include_package_data=True, @@ -24,8 +26,10 @@ setup( "Framework :: Django", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], entry_points={"pulpcore.plugin": ["{{ plugin_name | snake }} = {{ plugin_name | snake }}:default_app_config"]}, ) diff --git a/templates/github/.github/workflows/create-branch.yml.j2 b/templates/github/.github/workflows/create-branch.yml.j2 index 70209f16..ab196600 100644 --- a/templates/github/.github/workflows/create-branch.yml.j2 +++ b/templates/github/.github/workflows/create-branch.yml.j2 @@ -23,7 +23,7 @@ jobs: steps: {{ checkout(depth=0, path=plugin_name) | indent(6) }} - {{ setup_python(pyversion="3.8") | indent(6) }} + {{ setup_python() | indent(6) }} {{ install_python_deps(["bump2version", "jinja2", "pyyaml", "packaging"]) | indent(6) }} diff --git a/templates/github/.github/workflows/publish.yml.j2 b/templates/github/.github/workflows/publish.yml.j2 index 3bb919df..af9253be 100644 --- a/templates/github/.github/workflows/publish.yml.j2 +++ b/templates/github/.github/workflows/publish.yml.j2 @@ -121,7 +121,7 @@ jobs: name: "plugin_package" path: "{{ plugin_name }}/dist/" - {{ setup_python(pyversion="3.8") | indent(6) }} + {{ setup_python() | indent(6) }} {{ install_python_deps(["twine"]) | indent(6) }} @@ -156,7 +156,7 @@ jobs: tar -xvf {{ plugin.app_label }}-python-client.tar {%- endfor %} - {{ setup_python(pyversion="3.8") | indent(6) }} + {{ setup_python() | indent(6) }} {{ install_python_deps(["twine"]) | indent(6) }} @@ -212,7 +212,7 @@ jobs: steps: {{ checkout(depth=1, path=plugin_name) | indent(6) }} - {{ setup_python(pyversion="3.8") | indent(6) }} + {{ setup_python() | indent(6) }} {{ install_python_deps(["packaging~=21.3", "requests"]) | indent(6) }} diff --git a/templates/github/.github/workflows/release.yml.j2 b/templates/github/.github/workflows/release.yml.j2 index dee52ec6..85981a48 100644 --- a/templates/github/.github/workflows/release.yml.j2 +++ b/templates/github/.github/workflows/release.yml.j2 @@ -29,7 +29,7 @@ jobs: steps: {{ checkout(depth=0, path=plugin_name, use_release_token=true) | indent(6) }} - {{ setup_python(pyversion="3.8") | indent(6) }} + {{ setup_python() | indent(6) }} {{ install_python_deps(["bump2version", "towncrier"]) | indent(6) }} diff --git a/templates/github/.github/workflows/scripts/install.sh.j2 b/templates/github/.github/workflows/scripts/install.sh.j2 index cfeacfd7..b138de2d 100755 --- a/templates/github/.github/workflows/scripts/install.sh.j2 +++ b/templates/github/.github/workflows/scripts/install.sh.j2 @@ -233,11 +233,18 @@ sudo update-ca-certificates echo ::endgroup:: {%- endif %} +# Add our azcert.crt certificate to the container image along with the certificates from certifi +# so that we can use HTTPS with our fake Azure CI. certifi is self-contained and doesn't allow +# extension or modification of the trust store, so we do a weird and hacky thing (above) where we just +# overwrite or append to certifi's trust store behind it's back. +# +# We do this for both the CI host and the CI image. if [[ "$TEST" = "azure" ]]; then {%- if pulp_scheme == "https" %} AZCERTIFI=$(/opt/az/bin/python3 -c 'import certifi; print(certifi.where())') + PULPCERTIFI=$(cmd_prefix python3 -c 'import certifi; print(certifi.where())') cat /usr/local/share/ca-certificates/azcert.crt >> $AZCERTIFI - cat /usr/local/share/ca-certificates/azcert.crt | cmd_stdin_prefix tee -a /usr/local/lib/python3.8/site-packages/certifi/cacert.pem > /dev/null + cat /usr/local/share/ca-certificates/azcert.crt | cmd_stdin_prefix tee -a "$PULPCERTIFI" > /dev/null cat /usr/local/share/ca-certificates/azcert.crt | cmd_stdin_prefix tee -a /etc/pki/tls/cert.pem > /dev/null {%- endif %} AZURE_STORAGE_CONNECTION_STRING='DefaultEndpointsProtocol={{ pulp_scheme }};AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint={{ pulp_scheme }}://ci-azurite:10000/devstoreaccount1;'