Skip to content

Commit

Permalink
Initial implementation of GitLab OIDC trusted publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
facutuesca committed Jan 26, 2024
1 parent 8f395d8 commit 6d1a5fa
Show file tree
Hide file tree
Showing 21 changed files with 2,094 additions and 139 deletions.
26 changes: 26 additions & 0 deletions tests/common/db/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
from warehouse.oidc.models import (
ActiveStatePublisher,
GitHubPublisher,
GitLabPublisher,
GooglePublisher,
PendingActiveStatePublisher,
PendingGitHubPublisher,
PendingGitLabPublisher,
PendingGooglePublisher,
)

Expand Down Expand Up @@ -51,6 +53,30 @@ class Meta:
added_by = factory.SubFactory(UserFactory)


class GitLabPublisherFactory(WarehouseFactory):
class Meta:
model = GitLabPublisher

id = factory.Faker("uuid4", cast_to=None)
project = factory.Faker("pystr", max_chars=12)
namespace = factory.Faker("pystr", max_chars=12)
workflow_filepath = "subfolder/example.yml"
environment = "production"


class PendingGitLabPublisherFactory(WarehouseFactory):
class Meta:
model = PendingGitLabPublisher

id = factory.Faker("uuid4", cast_to=None)
project_name = "fake-nonexistent-project"
project = factory.Faker("pystr", max_chars=12)
namespace = factory.Faker("pystr", max_chars=12)
workflow_filepath = "subfolder/example.yml"
environment = "production"
added_by = factory.SubFactory(UserFactory)


class GooglePublisherFactory(WarehouseFactory):
class Meta:
model = GooglePublisher
Expand Down
Loading

0 comments on commit 6d1a5fa

Please sign in to comment.