Class: JenkinsApi::CLI::System

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/jenkins_api_client/cli/system.rb

Overview

This class provides various command line operations to System class.

Instance Method Summary collapse

Instance Method Details

#cancel_quietdownObject

CLI command that cancels Jenkins from Quiet Down mode



41
42
43
44
# File 'lib/jenkins_api_client/cli/system.rb', line 41

def cancel_quietdown
  @client = Helper.setup(parent_options)
  @client.system.cancel_quiet_down
end

#quietdownObject

CLI command that puts Jenkins in Quiet Down mode



34
35
36
37
# File 'lib/jenkins_api_client/cli/system.rb', line 34

def quietdown
  @client = Helper.setup(parent_options)
  @client.system.quiet_down
end

#reloadObject

CLI command to reload Jenkins configuration from disk



48
49
50
51
# File 'lib/jenkins_api_client/cli/system.rb', line 48

def reload
  @client = Helper.setup(parent_options)
  @client.system.reload
end

#restartObject

CLI command to (force) restart Jenkins



57
58
59
60
61
# File 'lib/jenkins_api_client/cli/system.rb', line 57

def restart
  @client = Helper.setup(parent_options)
  force = options[:force] ? true : false
  @client.system.restart(force)
end