Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RPM jobs as upstream of upload jobs #1052

Merged
merged 2 commits into from
May 25, 2024
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from ros_buildfarm.argument import add_argument_dry_run
from ros_buildfarm.common import get_release_job_prefix
from ros_buildfarm.common import JobValidationError
from ros_buildfarm.common import package_format_mapping
from ros_buildfarm.config import get_index
from ros_buildfarm.config import get_release_build_files
from ros_buildfarm.jenkins import configure_job
Expand Down Expand Up @@ -68,11 +69,23 @@ def get_sync_targets(config, repo):

def get_upstream_job_names(config, repo):
distributions = config.distributions.keys()
package_formats_per_rosdistro = {}
for rosdistro in distributions:
package_formats_per_rosdistro.setdefault(rosdistro, set())
build_files = get_release_build_files(config, rosdistro)
for build_file in build_files.values():
for os_name in build_file.targets.keys():
package_formats_per_rosdistro[rosdistro].add(
package_format_mapping[os_name])
upstream_job_names = []
if repo == 'main':
upstream_job_names = ['{0}_sync-packages-to-{1}'.format(
get_release_job_prefix(rosdistro), repo) for rosdistro in distributions]
for rosdistro, package_formats in package_formats_per_rosdistro.items():
for package_format in package_formats:
upstream_job_names.append(
'{0}_sync-packages-to-{1}{2}'.format(
get_release_job_prefix(rosdistro), repo,
'' if package_format == 'deb' else '-' + package_format))
elif repo == 'testing':
upstream_job_names = []
for rosdistro in distributions:
architectures_by_code_name = {}
build_files = get_release_build_files(config, rosdistro)
Expand All @@ -93,7 +106,13 @@ def get_upstream_job_names(config, repo):
arch=arch))
else:
raise JobValidationError("Unknown upstream jobs for job 'upload_{}'." % repo)
upstream_job_names.append('import_upstream')
for package_format in set(
pf for pfs in package_formats_per_rosdistro.values() for pf in pfs
):
if package_format == 'deb':
upstream_job_names.append('import_upstream')
else:
upstream_job_names.append('import_upstream_' + package_format)
return ','.join(sorted(upstream_job_names))


Expand Down
Loading