Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,14 @@ libraries:
safemode:
rpm: true

pulp_plugins:
# Pulp plugins that integrate with Foreman ecosystem
# Packaged in pulpcore-packaging, not foreman-packaging
smart_proxy:
rpm: true
github_team: 'theforeman/pulp'
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. Do we want to add pulp_smart_proxy to the "foremanctl" team?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that makes sense, yeah

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I did that now in the repo)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to theforeman/foremanctl

satellite: true

auxiliary:
foreman-documentation:
description: "Official Katello documentation"
Expand Down
35 changes: 32 additions & 3 deletions fpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

# OS-specific packages use this path
DEBIAN_RELEASE = 'bookworm'
PACKAGING_URL = 'https://github.com/theforeman/foreman-packaging'
FOREMAN_PACKAGING_URL = 'https://github.com/theforeman/foreman-packaging'
PULPCORE_PACKAGING_URL = 'https://github.com/theforeman/pulpcore-packaging'


@dataclass
Expand Down Expand Up @@ -75,13 +76,13 @@ def github_team_url(self):
def rpm_url(self):
if not self.rpm:
return None
return f'{PACKAGING_URL}/tree/rpm/develop/packages/{self.rpm_directory}/{self.rpm}'
return f'{FOREMAN_PACKAGING_URL}/tree/rpm/develop/packages/{self.rpm_directory}/{self.rpm}'

@property
def deb_url(self):
if not self.deb:
return None
return f'{PACKAGING_URL}/tree/deb/develop/{self.deb_directory}/{self.deb}'
return f'{FOREMAN_PACKAGING_URL}/tree/deb/develop/{self.deb_directory}/{self.deb}'

@property
def puppet_module(self):
Expand Down Expand Up @@ -137,6 +138,31 @@ def __post_init__(self):
def puppet_module(self):
return 'puppet-foreman_proxy'

@dataclass
class PulpPlugin(PackagedEntry):
installer: bool = False

def __post_init__(self):
# Pulp plugins follow naming: pulp_{short_name} (like pulp_smart_proxy)
if not self.name:
self.name = f'pulp_{self.short_name}'
if self.rpm is True:
self.rpm = f'python-{self.name.replace("_", "-")}'
if not self.tests:
self.tests = {'github': {'Python': 'ci.yml'}}
super().__post_init__()

@property
def rpm_url(self):
if not self.rpm:
return None
return f'{PULPCORE_PACKAGING_URL}/tree/rpm/develop/packages/{self.rpm}'

@property
def deb_url(self):
# Pulp plugins don't have deb packages
return None

@dataclass
class HammerPlugin(PackagedEntry):
deb_directory: str = f'dependencies/{DEBIAN_RELEASE}'
Expand Down Expand Up @@ -212,6 +238,9 @@ def load_config(config):
data['libraries'] = [Library(short_name=repository_id, **(repository or {}))
for repository_id, repository in data['libraries'].items()]

data['pulp_plugins'] = [PulpPlugin(short_name=plugin_id, **(plugin or {}))
for plugin_id, plugin in data.get('pulp_plugins', {}).items()]

data['auxiliary'] = [Entry(short_name=repository_id, **(repository or {}))
for repository_id, repository in data['auxiliary'].items()]

Expand Down
3 changes: 3 additions & 0 deletions process
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def render_markdown(data):
print('# Libraries')
print_markdown_table(data['libraries'], i18n=False)

print('# Pulp Plugins')
print_markdown_table(data['pulp_plugins'], i18n=False)

print('# Client')
print_markdown_table(data['client'], i18n=False)

Expand Down