Class: Jenkins2::CLI::DeleteCredentialsDomain
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
79
80
81
|
# File 'lib/jenkins2/cli/credentials.rb', line 79
def self.description
'Delete credentials domain.'
end
|
Instance Method Details
#add_options ⇒ Object
83
84
85
86
87
88
89
90
91
|
# File 'lib/jenkins2/cli/credentials.rb', line 83
def add_options
parser.separator 'Mandatory arguments:'
parser.on '--store STORE', 'Store id. (e.g. "system")' do |s|
options[:store] = s
end
parser.on '--domain DOMAIN', 'Domain id. (e.g. "_")' do |d|
options[:domain] = d
end
end
|
#mandatory_arguments ⇒ Object
93
94
95
|
# File 'lib/jenkins2/cli/credentials.rb', line 93
def mandatory_arguments
super + %i[store domain]
end
|
#run ⇒ Object
97
98
99
|
# File 'lib/jenkins2/cli/credentials.rb', line 97
def run
jc.credentials.store(options[:store]).domain(options[:domain]).delete
end
|