Skip to content

Commit 4cb385d

Browse files
committed
Update CI files
1 parent 51f3ba0 commit 4cb385d

15 files changed

Lines changed: 27 additions & 50 deletions

File tree

.ci/scripts/check_release.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def main(options: argparse.Namespace, template_config: dict[str, t.Any]) -> int:
9999

100100
# Warning: This will not work if branch names contain "/" but we don't really care here.
101101
heads = [h.split("/")[-1] for h in repo.git.branch("--remote").split("\n")]
102-
available_branches = [h for h in heads if re.fullmatch(RELEASE_BRANCH_REGEX, h)]
103-
available_branches.sort(key=lambda ver: Version(ver))
104-
available_branches.append(DEFAULT_BRANCH)
102+
available_branches = sorted(
103+
{h for h in heads if re.fullmatch(RELEASE_BRANCH_REGEX, h)}, key=lambda ver: Version(ver)
104+
) + [DEFAULT_BRANCH]
105105

106106
branches = options.branches
107107
if branches == "supported":

.ci/scripts/check_requirements.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import warnings
1010
from packaging.requirements import Requirement
1111

12-
1312
CHECK_MATRIX = [
1413
("pyproject.toml", True, True, True),
1514
("requirements.txt", True, True, True),

.ci/scripts/collect_changes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from git import GitCommandError, Repo
2626
from packaging.version import parse as parse_version
2727

28-
2928
PYPI_PROJECT = "pulp_container"
3029

3130
# Read Towncrier settings

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ jobs:
4646
pulpcore-manager openapi --file "api.json"
4747
pulpcore-manager openapi --bindings --component "container" --file "container-api.json"
4848
- name: "Upload Package whl"
49-
uses: "actions/upload-artifact@v5"
49+
uses: "actions/upload-artifact@v7"
5050
with:
5151
name: "plugin_package"
5252
path: "pulp_container/dist/"
5353
if-no-files-found: "error"
5454
retention-days: 5
5555
overwrite: true
5656
- name: "Upload API specs"
57-
uses: "actions/upload-artifact@v5"
57+
uses: "actions/upload-artifact@v7"
5858
with:
5959
name: "api_spec"
6060
path: |
@@ -73,7 +73,7 @@ jobs:
7373
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
7474
GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}"
7575
- name: "Upload python client packages"
76-
uses: "actions/upload-artifact@v5"
76+
uses: "actions/upload-artifact@v7"
7777
with:
7878
name: "python-client.tar"
7979
path: |
@@ -82,7 +82,7 @@ jobs:
8282
retention-days: 5
8383
overwrite: true
8484
- name: "Upload python client docs"
85-
uses: "actions/upload-artifact@v5"
85+
uses: "actions/upload-artifact@v7"
8686
with:
8787
name: "python-client-docs.tar"
8888
path: |
@@ -100,7 +100,7 @@ jobs:
100100
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
101101
GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}"
102102
- name: "Upload Ruby client"
103-
uses: "actions/upload-artifact@v5"
103+
uses: "actions/upload-artifact@v7"
104104
with:
105105
name: "ruby-client.tar"
106106
path: |

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
id-token: "write"
3131

3232
steps:
33-
- uses: "actions/download-artifact@v4"
33+
- uses: "actions/download-artifact@v8"
3434
with:
3535
name: "plugin_package"
3636
path: "dist/"
@@ -53,7 +53,7 @@ jobs:
5353
path: "pulp_container"
5454

5555
- name: "Download Python client"
56-
uses: "actions/download-artifact@v4"
56+
uses: "actions/download-artifact@v8"
5757
with:
5858
name: "python-client.tar"
5959
path: "pulp_container/"
@@ -82,7 +82,7 @@ jobs:
8282
path: "pulp_container"
8383

8484
- name: "Download Ruby client"
85-
uses: "actions/download-artifact@v4"
85+
uses: "actions/download-artifact@v8"
8686
with:
8787
name: "ruby-client.tar"
8888
path: "pulp_container/"

.github/workflows/scripts/stage-changelog-for-default-branch.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
from git import Repo
1313
from git.exc import GitCommandError
1414

15-
16-
helper = textwrap.dedent(
17-
"""\
15+
helper = textwrap.dedent("""\
1816
Stage the changelog for a release on main branch.
1917
2018
Example:
2119
$ python .github/workflows/scripts/stage-changelog-for-default-branch.py 3.4.0
2220
23-
"""
24-
)
21+
""")
2522

2623
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description=helper)
2724

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
docker logs pulp 2>&1 | grep -i pulpcore.deprecation | tee deprecations-${{ matrix.env.TEST }}.txt
123123
124124
- name: "Upload Deprecations"
125-
uses: "actions/upload-artifact@v5"
125+
uses: "actions/upload-artifact@v7"
126126
with:
127127
name: "deprecations-${{ matrix.env.TEST }}"
128128
path: "pulp_container/deprecations-${{ matrix.env.TEST }}.txt"

lint_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# For more info visit https://github.com/pulp/plugin_template
77

8-
black==24.3.0
8+
black~=26.3 # Pin style to the year. https://black.readthedocs.io/en/stable/faq.html#how-stable-is-black-s-style
99
bump-my-version
1010
check-manifest
1111
flake8

pulp_container/app/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
SIGNATURE_TYPE,
4242
)
4343

44-
4544
logger = getLogger(__name__)
4645

4746

pulp_container/app/serializers.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from pulp_container.app import models, fields
3333
from pulp_container.constants import SIGNATURE_TYPE
3434

35-
3635
VALID_SIGNATURE_NAME_REGEX = r"^sha256:[0-9a-f]{64}@[0-9a-f]{32}$"
3736
VALID_TAG_REGEX = r"^[A-Za-z0-9][A-Za-z0-9._-]*$"
3837
VALID_BASE_PATH_REGEX_COMPILED = re.compile(r"^[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9])*$")
@@ -285,25 +284,21 @@ class ContainerRemoteSerializer(RemoteSerializer):
285284
child=serializers.CharField(max_length=255),
286285
allow_null=True,
287286
required=False,
288-
help_text=_(
289-
"""
287+
help_text=_("""
290288
A list of tags to include during sync.
291289
Wildcards *, ? are recognized.
292290
'include_tags' is evaluated before 'exclude_tags'.
293-
"""
294-
),
291+
"""),
295292
)
296293
exclude_tags = serializers.ListField(
297294
child=serializers.CharField(max_length=255),
298295
allow_null=True,
299296
required=False,
300-
help_text=_(
301-
"""
297+
help_text=_("""
302298
A list of tags to exclude during sync.
303299
Wildcards *, ? are recognized.
304300
'exclude_tags' is evaluated after 'include_tags'.
305-
"""
306-
),
301+
"""),
307302
)
308303

309304
policy = serializers.ChoiceField(
@@ -343,25 +338,21 @@ class ContainerPullThroughRemoteSerializer(RemoteSerializer):
343338
child=serializers.CharField(max_length=255),
344339
allow_null=True,
345340
required=False,
346-
help_text=_(
347-
"""
341+
help_text=_("""
348342
A list of remotes to include during pull-through caching.
349343
Wildcards *, ? are recognized.
350344
'includes' is evaluated before 'excludes'.
351-
"""
352-
),
345+
"""),
353346
)
354347
excludes = serializers.ListField(
355348
child=serializers.CharField(max_length=255),
356349
allow_null=True,
357350
required=False,
358-
help_text=_(
359-
"""
351+
help_text=_("""
360352
A list of remotes to exclude during pull-through caching.
361353
Wildcards *, ? are recognized.
362354
'excludes' is evaluated after 'includes'.
363-
"""
364-
),
355+
"""),
365356
)
366357

367358
class Meta:

0 commit comments

Comments
 (0)