Class: EbDeploy

Inherits:
Thor
  • Object
show all
Defined in:
lib/eb_deploy.rb

Instance Method Summary collapse

Instance Method Details

#deployObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/eb_deploy.rb', line 13

def deploy
  check_setup

  version = options[:version]
  repo = ENV['DOCKER_REPO']
  
  say 'Building Docker Image'
  command = "docker build -t #{repo}:#{version} ."
  system(command)

  say 'Tagging Docker Image'
  command = "docker tag #{repo}:#{version} #{repo}:latest"
  system(command)

  #command = "eb deploy -l #{version}"
  #system(command)
end

#setupObject



6
7
8
9
# File 'lib/eb_deploy.rb', line 6

def setup
  command = "eb init"
  system(command)
end