Skip to content

Commit

Permalink
Deprecate unused dist_file kwarg from configure_ci_job (#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
cottsay authored Dec 23, 2021
1 parent 32a3b92 commit 16ffa7e
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions ros_buildfarm/ci_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from ros_buildfarm.common import JobValidationError
from ros_buildfarm.common import write_groovy_script_and_configs
from ros_buildfarm.config import get_ci_build_files
from ros_buildfarm.config import get_distribution_file
from ros_buildfarm.config import get_index as get_config_index
from ros_buildfarm.git import get_repository
from ros_buildfarm.templates import expand_template
Expand Down Expand Up @@ -69,11 +68,6 @@ def _configure_ci_jobs(
for os_name, os_code_name, arch in targets:
print(' -', os_name, os_code_name, arch)

dist_file = get_distribution_file(index, rosdistro_name, build_file)
if not dist_file:
print('No distribution file matches the build file')
return

ci_view_name = get_ci_view_name(rosdistro_name)

# all further configuration will be handled by either the Jenkins API
Expand Down Expand Up @@ -104,8 +98,7 @@ def _configure_ci_jobs(
config_url, rosdistro_name, ci_build_name,
os_name, os_code_name, arch,
config=config, build_file=build_file,
index=index, dist_file=dist_file,
jenkins=jenkins, views=views,
index=index, jenkins=jenkins, views=views,
is_disabled=is_disabled,
groovy_script=groovy_script,
dry_run=dry_run,
Expand Down Expand Up @@ -161,11 +154,10 @@ def configure_ci_job(

if index is None:
index = get_index(config.rosdistro_index_url)
if dist_file is None:
dist_file = get_distribution_file(index, rosdistro_name, build_file)
if not dist_file:
raise JobValidationError(
'No distribution file matches the build file')
if dist_file is not None:
print(
'WARNING: dist_file keyword has been deprecated because it '
'was never actually used.', file=sys.stderr)

if os_name not in build_file.targets.keys():
raise JobValidationError(
Expand Down

0 comments on commit 16ffa7e

Please sign in to comment.