Class: Jenkins2::CLI::CreateCredentialsDomainByXml
Instance Attribute Summary
#errors, #options
Class Method Summary
collapse
Instance Method Summary
collapse
#call, class_to_command, #initialize, #parse, subcommands
Constructor Details
This class inherits a constructor from Jenkins2::CLI
Class Method Details
.description ⇒ Object
30
31
32
|
# File 'lib/jenkins2/cli/credentials.rb', line 30
def self.description
'Create credential domain by reading stdin as an XML configuration.'
end
|
Instance Method Details
#add_options ⇒ Object
34
35
36
37
38
39
|
# File 'lib/jenkins2/cli/credentials.rb', line 34
def add_options
parser.separator 'Mandatory arguments:'
parser.on '--store STORE', 'Store id. (e.g. "system")' do |s|
options[:store] = s
end
end
|
#mandatory_arguments ⇒ Object
41
42
43
|
# File 'lib/jenkins2/cli/credentials.rb', line 41
def mandatory_arguments
super + %i[store]
end
|
#run ⇒ Object
45
46
47
|
# File 'lib/jenkins2/cli/credentials.rb', line 45
def run
jc.credentials.store(options[:store]).create_domain($stdin.read)
end
|