module Subordinate::Client::System
System
level tasks for Jenkins Server. These functions typically require admin level privileges to execute.
@see ci.jenkins-ci.org/api/
Public Instance Methods
Cancel a shut down request to the Jenkins Server
@see ci.jenkins-ci.org/api/
@return [Integer] response code
@example Send a quiet down request to the Jenkins server
Subordinate::Client.cancel_quiet_down
# File lib/subordinate/client/system.rb, line 42 def cancel_quiet_down(options = {}) post('/cancelQuietDown', options) end
Shuts down Jenkins Server
@see ci.jenkins-ci.org/api/
@return [Integer] response code
@example Send a quiet down request to the Jenkins server
Subordinate::Client.quiet_down
# File lib/subordinate/client/system.rb, line 30 def quiet_down(options = {}) post('/quietDown', options) end
Restarts the jenkins server, will not wait for jobs to finish
@see ci.jenkins-ci.org/api/
@return [Integer] response code
@example Sends a force restart request to the Jenkins server
Subordinate::Client.restart(true)
# File lib/subordinate/client/system.rb, line 54 def restart(options = {}) post("restart", options) end
Returns the response from the root api
@see ci.jenkins-ci.org/api/json?pretty=true
@return [Hashie::Mash] State is the server is currently up
@example Get the root api response
Subordinate::Client.root
# File lib/subordinate/client/system.rb, line 18 def root(options = {}) get('/api/json', options) end
Safely Restarts the jenkins server, will wait for jobs to finish
@see ci.jenkins-ci.org/api/
@return [Integer] response code
@example Sends a restart request to the Jenkins server (defaults to no force)
Subordinate::Client.restart
# File lib/subordinate/client/system.rb, line 66 def safe_restart(options = {}) post("safeRestart", options) end