Class: Bcnd::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/bcnd/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRunner



6
7
8
# File 'lib/bcnd/runner.rb', line 6

def initialize
  self.env = Bcnd::CI.new
end

Instance Attribute Details

#envObject

Returns the value of attribute env.



5
6
7
# File 'lib/bcnd/runner.rb', line 5

def env
  @env
end

Instance Method Details

#deployObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/bcnd/runner.rb', line 10

def deploy
  if env.pull_request?
    puts "Nothing to do for a pull request. Exiting."
    return
  end

  case env.deploy_stage
  when :mainline
    deploy_mainline
  when :stable
    deploy_stable
  else
    puts "Can't recognize the current stage"
  end
end