Skip to content

Commit c45f8c1

Browse files
authored
bcr_presubmit: Use Rocky Linux instead of CentOS (#2314)
Some module repos still contain presubmit.yml templates that reference CentOS 7 (which has been deprecated in favor of Rocky Linux 8). Eventually we should remove all these references, but for now we can work around this problem by replacing centos7 tasks with their rockylinux8 equivalent during presubmit. Progress towards #2272
1 parent c15c7b5 commit c45f8c1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

buildkite/bazel-central-registry/bcr_presubmit.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def get_test_module_task_config(module_name, module_version, bazel_version=None)
135135

136136
def add_presubmit_jobs(module_name, module_version, task_configs, pipeline_steps, is_test_module=False, overwrite_bazel_version=None, calc_concurrency=None):
137137
for task_id, task_config in task_configs.items():
138-
platform_name = bazelci.get_platform_for_task(task_id, task_config)
138+
platform_name = get_platform(task_id, task_config)
139139
platform_label = bazelci.PLATFORMS[platform_name]["emoji-name"]
140140
task_name = task_config.get("name", "")
141141
label = f"{module_name}@{module_version} - {platform_label} - {task_name}"
@@ -165,6 +165,13 @@ def add_presubmit_jobs(module_name, module_version, task_configs, pipeline_steps
165165
pipeline_steps.append(bazelci.create_step(label, commands, platform_name, concurrency=concurrency, concurrency_group=concurrency_group))
166166

167167

168+
def get_platform(task_id, task_config):
169+
original = bazelci.get_platform_for_task(task_id, task_config)
170+
# TODO(#2272): delete once centos references have been deleted
171+
# from BCR templates in all module repos.
172+
return original.replace("centos7", "rockylinux8")
173+
174+
168175
def scratch_file(root, relative_path, lines=None, mode="w"):
169176
"""Creates a file under the root directory"""
170177
if not relative_path:

0 commit comments

Comments
 (0)