Skip to content

Commit

Permalink
Re-work distribution_type for global CI, fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
cottsay committed Jun 21, 2024
1 parent 82691f6 commit b390cf5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions ros_buildfarm/ci_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,12 @@ def _get_ci_job_config(
'%s=%s' % (var, value)
for var, value in sorted(build_file.build_environment_variables.items())]

distribution_type = index.distributions.get(rosdistro_name, {}) \
.get('distribution_type', 'ros1')
assert distribution_type in (None, 'ros1', 'ros2')
if rosdistro_name:
distribution_type = index.distributions[rosdistro_name] \
.get('distribution_type', 'ros1')
assert distribution_type in ('ros1', 'ros2')
else:
distribution_type = 'global'
ros_version = 1 if distribution_type == 'ros1' else 2

for index in range(len(underlay_source_jobs)):
Expand Down
2 changes: 1 addition & 1 deletion ros_buildfarm/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_ci_build_files(index, dist_name):
def get_global_ci_build_files(index):
data = _load_build_file_data(index.ci_builds)
build_files = {}
for k, v in data.items():
for k, (url, v) in data.items():
build_files[k] = CIBuildFile(k, v)
return build_files

Expand Down

0 comments on commit b390cf5

Please sign in to comment.