Skip to content

Commit

Permalink
Avoid abicheckers to be generated with no whiteListedBranches (#1144)
Browse files Browse the repository at this point in the history
* Avoid abicheckers to be generated with no whiteListedBranches

---------
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored May 23, 2024
1 parent fdac32c commit 0d2fcf7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions jenkins-scripts/dsl/dsl_checks.bash
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ if [[ -n ${non_github_orgs} ]]; then
exit 1
fi

# Check that whiteListedTargetBranches are non empty in all generated gazebo_libs
# see https://github.com/gazebo-tooling/release-tools/pull/1144
# For other jobs the use case is valid since pr can be enabled on all branches
empty_branches_on_github_triggered=$(grep '<whiteListTargetBranches></whiteListTargetBranches>' \
-- {gz_,sdformat}*{-abichecker-,-pr_any-}*.xml || true)
if [[ -n ${empty_branches_on_github_triggered} ]]; then
echo "Unexpected whiteListTargetBranches without values. It will trigger all branches:"
echo "${empty_branches_on_github_triggered}"
exit 1
fi

# re-enable after https://github.com/gazebo-tooling/release-tools/issues/1095

# Filter out the previous auto jobs
Expand Down
3 changes: 2 additions & 1 deletion jenkins-scripts/dsl/gazebo_libs.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ gz_collections_yaml.collections.each { collection ->
branch_index[lib_name][platform]['pr'] << [branch: branch_name, ci_name: config_name]
}
if (categories_enabled.contains('pr_abichecker') &&
(branch_name != 'main') &&
(! ci_config.exclude.abichecker?.contains(lib_name)))
{
branch_index[lib_name][platform]['pr_abichecker'].contains(branch_name) ?:
Expand Down Expand Up @@ -482,7 +483,7 @@ branch_index.each { lib_name, distro_configs ->
OSRFLinuxABIGitHub.create(abi_job)
GenericAnyJobGitHub.create(abi_job,
"gazebosim/${lib_name}",
branch_names - [ 'main'])
branch_names)
generate_label_by_requirements(abi_job, lib_name, ci_config.requirements)
abi_job.with
{
Expand Down

0 comments on commit 0d2fcf7

Please sign in to comment.