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_quiet_down(options = {}) click to toggle source

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
quiet_down(options = {}) click to toggle source

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
restart(options = {}) click to toggle source

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
root(options = {}) click to toggle source

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
safe_restart(options = {}) click to toggle source

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