Class: Hippo::Stage
- Inherits:
-
Object
- Object
- Hippo::Stage
- Defined in:
- lib/hippo/stage.rb
Instance Method Summary collapse
- #branch ⇒ Object
-
#initialize(options) ⇒ Stage
constructor
A new instance of Stage.
- #kubectl(*command) ⇒ Object
- #name ⇒ Object
- #namespace ⇒ Object
- #template_vars ⇒ Object
Constructor Details
#initialize(options) ⇒ Stage
Returns a new instance of Stage.
5 6 7 |
# File 'lib/hippo/stage.rb', line 5 def initialize() @options = end |
Instance Method Details
#branch ⇒ Object
13 14 15 |
# File 'lib/hippo/stage.rb', line 13 def branch @options['branch'] end |
#kubectl(*command) ⇒ Object
30 31 32 |
# File 'lib/hippo/stage.rb', line 30 def kubectl(*command) "kubectl -n #{namespace} #{command.join(' ')}" end |
#name ⇒ Object
9 10 11 |
# File 'lib/hippo/stage.rb', line 9 def name @options['name'] end |
#namespace ⇒ Object
17 18 19 |
# File 'lib/hippo/stage.rb', line 17 def namespace @options['namespace'] end |
#template_vars ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/hippo/stage.rb', line 21 def template_vars { 'name' => name, 'branch' => branch, 'namespace' => namespace, 'vars' => @options['vars'] || {} } end |