Module: Deploy::Versions

Includes:
Utility
Included in:
Runner
Defined in:
lib/deploy/versions.rb

Instance Method Summary collapse

Methods included from Utility

#command?

Instance Method Details

#application_versions_arrayObject



19
20
21
# File 'lib/deploy/versions.rb', line 19

def application_versions_array
  @array ||= eb.describe_application_versions.application_versions.reverse.map(&:version_label)
end

#current_version_for_environment(environment) ⇒ Object



15
16
17
# File 'lib/deploy/versions.rb', line 15

def current_version_for_environment(environment)
  eb.describe_environments(environment_names: [environment]).environments.first.version_label
end

#ebObject



7
8
9
# File 'lib/deploy/versions.rb', line 7

def eb
  Aws::ElasticBeanstalk::Client.new
end

#version_exists?(version) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/deploy/versions.rb', line 11

def version_exists?(version)
  application_versions_array.include?(version)
end