Module: Jenkins::Listeners::RunListener
Overview
Receive notification of build events.
Include this module in your class in order to receive callbacks when builds are started, completed, deleted, etc…
To receive a callback, override the method with the same name as the event. E.g.
class MyRunListener
include Jenkins::Listeners::RunListener
def started(build, listener)
puts "build.inspect started!"
end
end
Instance Method Summary collapse
-
#completed(build, listener) ⇒ Object
Called after a build is completed.
-
#deleted(build) ⇒ Object
Called right before a build is going to be deleted.
-
#finalized(build) ⇒ Object
Called after a build is finalized.
-
#started(build, listener) ⇒ Object
Called when a build is started (i.e. it was in the queue, and will now start running on an executor).
Methods included from Plugin::Behavior
extended, implemented, included
Methods included from Plugin::Behavior::BehavesAs
Instance Method Details
#completed(build, listener) ⇒ Object
Called after a build is completed.
38 39 |
# File 'lib/jenkins/listeners/run_listener.rb', line 38 def completed(build, listener) end |
#deleted(build) ⇒ Object
Called right before a build is going to be deleted.
53 54 |
# File 'lib/jenkins/listeners/run_listener.rb', line 53 def deleted(build) end |
#finalized(build) ⇒ Object
Called after a build is finalized.
At this point, all the records related to a build is written down to the disk. As such, task Listener is no longer available. This happens later than #completed.
47 48 |
# File 'lib/jenkins/listeners/run_listener.rb', line 47 def finalized(build) end |
#started(build, listener) ⇒ Object
Called when a build is started (i.e. it was in the queue, and will now start running on an executor)
31 32 |
# File 'lib/jenkins/listeners/run_listener.rb', line 31 def started(build, listener) end |