Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add per-package configuration for release binary job weight #1063

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/configuration_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ The following options are valid in version ``2`` (beside the generic options):
* ``jenkins_source_job_priority``: the job priority of *source* jobs.
* ``jenkins_source_job_timeout``: the job timeout for *source* jobs.

* ``jenkins_binary_job_weight_override``: per-package override of the number of
executors on a worker which are required to execute a job.
All jobs default to ``1``.
Uses the Jenkins Heavy Job plugin.

* ``notifications``: a dictionary with the following keys:

* ``emails``: a list of static email addresses.
Expand Down
5 changes: 5 additions & 0 deletions ros_buildfarm/config/release_build_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ def __init__(self, name, data): # noqa: D107
self.jenkins_source_job_timeout = \
int(data['jenkins_source_job_timeout'])

self.jenkins_binary_job_weight_overrides = {}
if 'jenkins_binary_job_weight_overrides' in data:
self.jenkins_binary_job_weight_overrides = data['jenkins_binary_job_weight_overrides']
assert isinstance(self.jenkins_binary_job_weight_overrides, dict)

self.package_whitelist = []
if 'package_whitelist' in data and data['package_whitelist']:
self.package_whitelist = data['package_whitelist']
Expand Down
1 change: 1 addition & 0 deletions ros_buildfarm/release_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ def _get_binarydeb_job_config(
'github_url': get_github_project_url(release_repository.url),

'job_priority': build_file.jenkins_binary_job_priority,
'job_weight': build_file.jenkins_binary_job_weight_overrides.get(pkg_name),
'node_label': get_node_label(
build_file.jenkins_binary_job_label,
get_default_node_label('%s_%s%s_%s' % (
Expand Down
1 change: 1 addition & 0 deletions ros_buildfarm/templates/release/deb/binarypkg_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ but disabled since the package is blacklisted (or not whitelisted) in the config
))@
@(SNIPPET(
'property_job-weight',
weight=job_weight,
))@
</properties>
@(SNIPPET(
Expand Down
Loading