Skip to content

Commit

Permalink
Add a check to avoid infinite number of builds archived by a job
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Oct 8, 2024
1 parent 70252c2 commit 6a3a07d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions jenkins-scripts/dsl/dsl_checks.bash
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ if [[ -n ${empty_branches_on_github_triggered} ]]; then
exit 1
fi

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

# Filter out the previous auto jobs
filtered_dir=$(mktemp -d)
cp -- *-abichecker-*.xml "${filtered_dir}"
Expand All @@ -76,3 +74,11 @@ if [[ -n ${repeated} ]]; then
echo "please exclude one of the versions in the yaml file to reduce the server workload"
exit 1
fi

avoid_infinite_build_archive=$(grep '<numToKeep>-1</numToKeep>' -- *.xml)
if [[ -n ${avoid_infinite_build_archive} ]]; then
echo "Found a job setup to keep infinite number of builds. This is BAD"
echo "${}"
exit 1
fi

0 comments on commit 6a3a07d

Please sign in to comment.