Class: Hooligan::Cli::DevCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/hooligan/cli/dev_command.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/hooligan/cli/dev_command.rb', line 8

def execute
  Dir.chdir Project.hooligan_dir

  puts 'WARNING: You need to change the kubernetes context manually first!'
  puts 'Press ^C unless you are in correct Kubernetes context, sleeping 3 seconds'
  sleep 3

  case profile when 'exo'
    puts "Serving at http://#{Project.project_name}.qa-aws-eu-central-1-1.exo.planeetta.net"
    exec 'skaffold dev -p exo'
  when 'local'
    puts "Serving at http://#{Project.project_name}.localtest.me"
    exec 'skaffold dev'
  else
    raise "Unknown profile: #{profile}"
  end
end