def _get_doc_job_config( config, config_url, rosdistro_name, doc_build_name, build_file, os_name, os_code_name, arch, doc_repo_spec, repo_name, dist_cache=None, is_disabled=False): template_name = 'doc/doc_job.xml.em' repository_args, script_generating_key_files = \ get_repositories_and_script_generating_key_files(build_file=build_file) maintainer_emails = set([]) if build_file.notify_maintainers and dist_cache and repo_name: # add maintainers listed in latest release to recipients repo = dist_cache.distribution_file.repositories[repo_name] if repo.release_repository: for pkg_name in repo.release_repository.package_names: if pkg_name not in dist_cache.release_package_xmls: continue pkg_xml = dist_cache.release_package_xmls[pkg_name] pkg = parse_package_string(pkg_xml) for m in pkg.maintainers: maintainer_emails.add(m.email) job_data = { 'github_url': get_github_project_url(doc_repo_spec.url), 'job_priority': build_file.jenkins_job_priority, 'node_label': build_file.jenkins_job_label, 'doc_repo_spec': doc_repo_spec, 'disabled': is_disabled, 'github_orgunit': git_github_orgunit(doc_repo_spec.url), 'ros_buildfarm_repository': get_repository(), 'script_generating_key_files': script_generating_key_files, 'config_url': config_url, 'rosdistro_index_url': config.rosdistro_index_url, 'rosdistro_name': rosdistro_name, 'doc_build_name': doc_build_name, 'os_name': os_name, 'os_code_name': os_code_name, 'arch': arch, 'repository_args': repository_args, 'notify_emails': build_file.notify_emails, 'maintainer_emails': maintainer_emails, 'notify_maintainers': build_file.notify_maintainers, 'notify_committers': build_file.notify_committers, 'timeout_minutes': build_file.jenkins_job_timeout, 'credential_id': build_file.upload_credential_id, } job_config = expand_template(template_name, job_data) return job_config
def _get_doc_job_config(config, config_url, rosdistro_name, doc_build_name, build_file, os_name, os_code_name, arch, doc_repo_spec, repo_name, dist_cache=None, is_disabled=False): template_name = 'doc/doc_job.xml.em' repository_args, script_generating_key_files = \ get_repositories_and_script_generating_key_files(build_file=build_file) maintainer_emails = set([]) if build_file.notify_maintainers and dist_cache and repo_name: # add maintainers listed in latest release to recipients repo = dist_cache.distribution_file.repositories[repo_name] if repo.release_repository: for pkg_name in repo.release_repository.package_names: if pkg_name not in dist_cache.release_package_xmls: continue pkg_xml = dist_cache.release_package_xmls[pkg_name] pkg = parse_package_string(pkg_xml) for m in pkg.maintainers: maintainer_emails.add(m.email) job_data = { 'github_url': get_github_project_url(doc_repo_spec.url), 'job_priority': build_file.jenkins_job_priority, 'node_label': build_file.jenkins_job_label, 'doc_repo_spec': doc_repo_spec, 'disabled': is_disabled, 'github_orgunit': git_github_orgunit(doc_repo_spec.url), 'ros_buildfarm_repository': get_repository(), 'script_generating_key_files': script_generating_key_files, 'config_url': config_url, 'rosdistro_index_url': config.rosdistro_index_url, 'rosdistro_name': rosdistro_name, 'doc_build_name': doc_build_name, 'os_name': os_name, 'os_code_name': os_code_name, 'arch': arch, 'repository_args': repository_args, 'notify_emails': build_file.notify_emails, 'maintainer_emails': maintainer_emails, 'notify_maintainers': build_file.notify_maintainers, 'notify_committers': build_file.notify_committers, 'timeout_minutes': build_file.jenkins_job_timeout, 'credential_id': build_file.upload_credential_id, } job_config = expand_template(template_name, job_data) return job_config
def _get_devel_job_config(config, rosdistro_name, source_build_name, build_file, os_name, os_code_name, arch, source_repo_spec, repo_name, pull_request, job_name, dist_cache=None, is_disabled=False): template_name = 'devel/devel_job.xml.em' repository_args, script_generating_key_files = \ get_repositories_and_script_generating_key_files(build_file=build_file) build_environment_variables = [] if build_file.build_environment_variables: build_environment_variables = [ '%s=%s' % (var, value) for var, value in build_file.build_environment_variables.items() ] maintainer_emails = set([]) if build_file.notify_maintainers and dist_cache and repo_name and \ repo_name in dist_cache.distribution_file.repositories: # add maintainers listed in latest release to recipients repo = dist_cache.distribution_file.repositories[repo_name] if repo.release_repository: for pkg_name in repo.release_repository.package_names: if pkg_name not in dist_cache.release_package_xmls: continue pkg_xml = dist_cache.release_package_xmls[pkg_name] pkg = parse_package_string(pkg_xml) for m in pkg.maintainers: maintainer_emails.add(m.email) job_priority = \ build_file.jenkins_commit_job_priority \ if not pull_request \ else build_file.jenkins_pull_request_job_priority job_data = { 'github_url': get_github_project_url(source_repo_spec.url), 'job_priority': job_priority, 'node_label': get_node_label( build_file.jenkins_job_label, get_default_node_label( '%s_%s_%s' % (rosdistro_name, 'devel', source_build_name))), 'pull_request': pull_request, 'source_repo_spec': source_repo_spec, 'disabled': is_disabled, # this should not be necessary 'job_name': job_name, 'github_orgunit': git_github_orgunit(source_repo_spec.url), 'ros_buildfarm_repository': get_repository(), 'script_generating_key_files': script_generating_key_files, 'rosdistro_index_url': config.rosdistro_index_url, 'rosdistro_name': rosdistro_name, 'source_build_name': source_build_name, 'os_name': os_name, 'os_code_name': os_code_name, 'arch': arch, 'repository_args': repository_args, 'build_environment_variables': build_environment_variables, 'notify_compiler_warnings': build_file.notify_compiler_warnings, 'notify_emails': build_file.notify_emails, 'maintainer_emails': maintainer_emails, 'notify_maintainers': build_file.notify_maintainers, 'notify_committers': build_file.notify_committers, 'notify_pull_requests': build_file.notify_pull_requests, 'timeout_minutes': build_file.jenkins_job_timeout, 'git_ssh_credential_id': config.git_ssh_credential_id, 'collate_test_stats': build_file.collate_test_stats, } job_config = expand_template(template_name, job_data) return job_config
def _get_devel_job_config( config, rosdistro_name, source_build_name, build_file, os_name, os_code_name, arch, source_repo_spec, repo_name, pull_request, job_name, dist_cache=None, is_disabled=False): template_name = 'devel/devel_job.xml.em' repository_args, script_generating_key_files = \ get_repositories_and_script_generating_key_files(build_file=build_file) maintainer_emails = set([]) if build_file.notify_maintainers and dist_cache and repo_name and \ repo_name in dist_cache.distribution_file.repositories: # add maintainers listed in latest release to recipients repo = dist_cache.distribution_file.repositories[repo_name] if repo.release_repository: for pkg_name in repo.release_repository.package_names: if pkg_name not in dist_cache.release_package_xmls: continue pkg_xml = dist_cache.release_package_xmls[pkg_name] pkg = parse_package_string(pkg_xml) for m in pkg.maintainers: maintainer_emails.add(m.email) job_priority = \ build_file.jenkins_commit_job_priority \ if not pull_request \ else build_file.jenkins_pull_request_job_priority job_data = { 'github_url': get_github_project_url(source_repo_spec.url), 'job_priority': job_priority, 'node_label': build_file.jenkins_job_label, 'pull_request': pull_request, 'source_repo_spec': source_repo_spec, 'disabled': is_disabled, # this should not be necessary 'job_name': job_name, 'github_orgunit': git_github_orgunit(source_repo_spec.url), 'ros_buildfarm_repository': get_repository(), 'script_generating_key_files': script_generating_key_files, 'rosdistro_index_url': config.rosdistro_index_url, 'rosdistro_name': rosdistro_name, 'source_build_name': source_build_name, 'os_name': os_name, 'os_code_name': os_code_name, 'arch': arch, 'repository_args': repository_args, 'notify_compiler_warnings': build_file.notify_compiler_warnings, 'notify_emails': build_file.notify_emails, 'maintainer_emails': maintainer_emails, 'notify_maintainers': build_file.notify_maintainers, 'notify_committers': build_file.notify_committers, 'timeout_minutes': build_file.jenkins_job_timeout, 'git_ssh_credential_id': config.git_ssh_credential_id, } job_config = expand_template(template_name, job_data) return job_config
def _get_devel_job_config( index, config, rosdistro_name, source_build_name, build_file, os_name, os_code_name, arch, source_repo_spec, repo_name, pull_request, job_name, dist_cache=None, is_disabled=False): template_name = 'devel/devel_job.xml.em' repository_args, script_generating_key_files = \ get_repositories_and_script_generating_key_files(build_file=build_file) build_environment_variables = [] if build_file.build_environment_variables: build_environment_variables = [ '%s=%s' % (var, value) for var, value in build_file.build_environment_variables.items()] maintainer_emails = set([]) if build_file.notify_maintainers and dist_cache and repo_name and \ repo_name in dist_cache.distribution_file.repositories: # add maintainers listed in latest release to recipients repo = dist_cache.distribution_file.repositories[repo_name] if repo.release_repository: for pkg_name in repo.release_repository.package_names: if pkg_name not in dist_cache.release_package_xmls: continue pkg_xml = dist_cache.release_package_xmls[pkg_name] pkg = parse_package_string(pkg_xml) for m in pkg.maintainers: maintainer_emails.add(m.email) job_priority = \ build_file.jenkins_commit_job_priority \ if not pull_request \ else build_file.jenkins_pull_request_job_priority distribution_type = index.distributions[rosdistro_name] \ .get('distribution_type', 'ros1') assert distribution_type in ('ros1', 'ros2') ros_version = 1 if distribution_type == 'ros1' else 2 job_data = { 'github_url': get_github_project_url(source_repo_spec.url), 'job_priority': job_priority, 'node_label': get_node_label( build_file.jenkins_job_label, get_default_node_label('%s_%s_%s' % ( rosdistro_name, 'devel', source_build_name))), 'pull_request': pull_request, 'source_repo_spec': source_repo_spec, 'disabled': is_disabled, # this should not be necessary 'job_name': job_name, 'github_orgunit': git_github_orgunit(source_repo_spec.url), 'ros_buildfarm_repository': get_repository(), 'script_generating_key_files': script_generating_key_files, 'rosdistro_index_url': config.rosdistro_index_url, 'rosdistro_name': rosdistro_name, 'source_build_name': source_build_name, 'os_name': os_name, 'os_code_name': os_code_name, 'arch': arch, 'repository_args': repository_args, 'build_tool': build_file.build_tool, 'ros_version': ros_version, 'build_environment_variables': build_environment_variables, 'notify_compiler_warnings': build_file.notify_compiler_warnings, 'notify_emails': build_file.notify_emails, 'maintainer_emails': maintainer_emails, 'notify_maintainers': build_file.notify_maintainers, 'notify_committers': build_file.notify_committers, 'notify_pull_requests': build_file.notify_pull_requests, 'timeout_minutes': build_file.jenkins_job_timeout, 'git_ssh_credential_id': config.git_ssh_credential_id, 'collate_test_stats': build_file.collate_test_stats, } job_config = expand_template(template_name, job_data) return job_config
def _get_devel_job_config( index, config, rosdistro_name, source_build_name, 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): template_name = 'devel/devel_job.xml.em' repository_args, script_generating_key_files = \ get_repositories_and_script_generating_key_files(build_file=build_file) build_environment_variables = [] if build_file.build_environment_variables: build_environment_variables = [ '%s=%s' % (var, value) for var, value in sorted(build_file.build_environment_variables.items())] maintainer_emails = set([]) if build_file.notify_maintainers and dist_cache and repo_name and \ repo_name in dist_cache.distribution_file.repositories: # add maintainers listed in latest release to recipients repo = dist_cache.distribution_file.repositories[repo_name] if repo.release_repository: for pkg_name in repo.release_repository.package_names: if pkg_name not in dist_cache.release_package_xmls: continue pkg_xml = dist_cache.release_package_xmls[pkg_name] pkg = parse_package_string(pkg_xml) for m in pkg.maintainers: maintainer_emails.add(m.email) job_priority = \ build_file.jenkins_commit_job_priority \ if not pull_request \ else build_file.jenkins_pull_request_job_priority distribution_type = index.distributions[rosdistro_name] \ .get('distribution_type', 'ros1') assert distribution_type in ('ros1', 'ros2') ros_version = 1 if distribution_type == 'ros1' else 2 job_data = { 'github_url': get_github_project_url(source_repo_spec.url), 'job_priority': job_priority, 'node_label': get_node_label( build_file.jenkins_job_label, get_default_node_label('%s_%s_%s' % ( rosdistro_name, 'devel', source_build_name))), 'pull_request': pull_request, 'source_repo_spec': source_repo_spec, 'disabled': is_disabled, # this should not be necessary 'job_name': job_name, 'github_orgunit': git_github_orgunit(source_repo_spec.url), 'ros_buildfarm_repository': get_repository(), 'script_generating_key_files': script_generating_key_files, 'rosdistro_index_url': config.rosdistro_index_url, 'rosdistro_name': rosdistro_name, 'source_build_name': source_build_name, 'os_name': os_name, 'os_code_name': os_code_name, 'arch': arch, 'repository_args': repository_args, 'build_tool': build_file.build_tool, 'ros_version': ros_version, 'build_environment_variables': build_environment_variables, 'run_abichecker': run_abichecker, 'require_gpu_support': require_gpu_support, 'notify_compiler_warnings': build_file.notify_compiler_warnings, 'notify_emails': build_file.notify_emails, 'maintainer_emails': maintainer_emails, 'notify_maintainers': build_file.notify_maintainers, 'notify_committers': build_file.notify_committers, 'notify_pull_requests': build_file.notify_pull_requests, 'timeout_minutes': build_file.jenkins_job_timeout, # only Ubuntu Focal has a new enough pytest version which generates # JUnit compliant result files 'xunit_publisher_types': get_xunit_publisher_types_and_patterns(), 'git_ssh_credential_id': config.git_ssh_credential_id, 'collate_test_stats': build_file.collate_test_stats, } job_config = expand_template(template_name, job_data) return job_config