Class: DeployApp

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#workload_hashObject

Returns the value of attribute workload_hash.



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

def workload_hash
  @workload_hash
end

Instance Method Details

#mainObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/deploy_app.rb', line 7

def main
  options = get_options
  take_approval(options)

  gcr_url = "asia.gcr.io/#{options[:project_id]}/#{options[:image_repo] || options[:app_name]}"

  if(!options[:image_tag].nil?)
    image_url = validate_image_tag_exists?(gcr_url, options[:image_tag])
  else
    image_url = build_image(gcr_url, options)
  end

  deploy_image(gcr_url, image_url, options)
end