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

Abort release builds if already re-queued #864

Merged
merged 4 commits into from
Mar 30, 2021
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
3 changes: 3 additions & 0 deletions ros_buildfarm/templates/release/rpm/binarypkg_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ but disabled since the package is blacklisted (or not whitelisted) in the config
@(SNIPPET(
'builder_system-groovy_check-free-disk-space',
))@
@(SNIPPET(
'builder_system-groovy_check-for-re-queue',
))@
@(SNIPPET(
'builder_shell_docker-info',
))@
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@{
# This is a workaround for ros-infrastructure/ros_buildfarm#475, which describes
# a decade-old bug in Jenkins that results jobs getting built twice
# unnecessarily.
}@
@(SNIPPET(
'builder_system-groovy',
command=
"""// VERIFY THAT THIS PROJECT HAS NOT ALREADY BEEN RE-QUEUED

println ""
println "# BEGIN SECTION: Check for duplicate triggers"

try {
project = Thread.currentThread().executable.project
if (project.isInQueue()) {
println "Another build of this project is already queued -> aborting build"
throw new InterruptedException()
}
} finally {
println "# END SECTION"
println ""
}
""",
script_file=None,
))@