From c70aaff0edda4e02282da4c7d6548c84e977ba67 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 11 Jun 2021 17:01:52 +0900 Subject: [PATCH] enable to pass --custom-rosdep-update-options to run_devel_job.py --- ros_buildfarm/devel_job.py | 11 ++++++++--- ros_buildfarm/templates/devel/devel_job.xml.em | 1 + scripts/prerelease/generate_prerelease_script.py | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ros_buildfarm/devel_job.py b/ros_buildfarm/devel_job.py index 87a9d74c3..5e4bd776c 100644 --- a/ros_buildfarm/devel_job.py +++ b/ros_buildfarm/devel_job.py @@ -252,7 +252,8 @@ def configure_devel_job( build_targets=None, dry_run=False, run_abichecker=None, - require_gpu_support=None): + require_gpu_support=None, + custom_rosdep_update_options=None): """ Configure a single Jenkins devel job. @@ -332,7 +333,9 @@ def configure_devel_job( build_file, os_name, os_code_name, arch, source_repository, repo_name, pull_request, job_name, dist_cache=dist_cache, is_disabled=is_disabled, run_abichecker=run_abichecker, - require_gpu_support=require_gpu_support) + require_gpu_support=require_gpu_support, + custom_rosdep_update_options=custom_rosdep_update_options) + print("job_confgi", job_config) # jenkinsapi.jenkins.Jenkins evaluates to false if job count is zero if isinstance(jenkins, object) and jenkins is not False: from ros_buildfarm.jenkins import configure_job @@ -353,7 +356,7 @@ def _get_devel_job_config( build_file, os_name, os_code_name, arch, source_repo_spec, repo_name, pull_request, job_name, dist_cache=None, is_disabled=False, run_abichecker=None, - require_gpu_support=None): + require_gpu_support=None,custom_rosdep_update_options=None): template_name = 'devel/devel_job.xml.em' repository_args, script_generating_key_files = \ @@ -425,6 +428,7 @@ def _get_devel_job_config( 'build_tool_test_args': build_file.build_tool_test_args, 'ros_version': ros_version, 'build_environment_variables': build_environment_variables, + 'custom_rosdep_update_options': custom_rosdep_update_options, 'run_abichecker': run_abichecker, 'require_gpu_support': require_gpu_support, @@ -451,5 +455,6 @@ def _get_devel_job_config( 'shared_ccache': build_file.shared_ccache, } + job_config = expand_template(template_name, job_data) return job_config diff --git a/ros_buildfarm/templates/devel/devel_job.xml.em b/ros_buildfarm/templates/devel/devel_job.xml.em index d0f322b63..a39b098d1 100644 --- a/ros_buildfarm/templates/devel/devel_job.xml.em +++ b/ros_buildfarm/templates/devel/devel_job.xml.em @@ -150,6 +150,7 @@ if pull_request: ' --ros-version ' + str(ros_version) + (' --run-abichecker' if run_abichecker else '') + (' --require-gpu-support' if require_gpu_support else '') + + (' --custom-rosdep-update-options="' + ' '.join(custom_rosdep_update_options) + '"' if custom_rosdep_update_options else '') + ' --env-vars ' + ' '.join(build_environment_variables) + ' --dockerfile-dir $WORKSPACE/docker_generating_dockers' + ' --build-tool-args $build_tool_args' + diff --git a/scripts/prerelease/generate_prerelease_script.py b/scripts/prerelease/generate_prerelease_script.py index 9bd94560e..49e5d6036 100755 --- a/scripts/prerelease/generate_prerelease_script.py +++ b/scripts/prerelease/generate_prerelease_script.py @@ -225,7 +225,8 @@ def beforeInclude(self, *_, **kwargs): index=index, dist_file=dist_file, dist_cache=dist_cache, jenkins=False, views=False, source_repository=source_repository, - build_targets=release_targets_combined) + build_targets=release_targets_combined, + custom_rosdep_update_options=args.custom_rosdep_update_options) templates.template_hooks = None