Sha256: c11d64ad9ce45961610537a46d15e450008a41edc3a2d3c73e84e6db6be5aea0

Contents?: true

Size: 1.21 KB

Versions: 3

Compression:

Stored size: 1.21 KB

Contents

class Ey::Core::Cli::Status < Ey::Core::Cli::Subcommand
  title "status"
  summary "Show the deployment status of the app"

  option :environment, short: "e", long: "environment", description: "Name or id of the environment to deploy to.", argument: "Environment"
  option :account,     short: 'c', long: 'account',     description: 'Name or ID of the account that the environment resides in.  If no account is specified, the app will deploy to the first environment that meets the criteria, in the accounts you have access to.', argument: 'Account name or id'
  option :app,         short: "a", long: "app",         description: "Application name or ID to deploy.  If :account is not specified, this will be the first app that matches the criteria in the accounts you have access to.", argument: "app"

  description <<-DESC
    Show the current status of the most recent deployment of the specifed application and environment
  DESC

  def handle
    operator, environment = core_operator_and_environment_for(self.options)
    app                   = core_application_for(self.options)
    deployments           = core_client.deployments.all(environment_id: environment.id, application_id: app.id)

    ap deployments.first
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ey-core-3.1.2 lib/ey-core/cli/status.rb
ey-core-3.1.1 lib/ey-core/cli/status.rb
ey-core-3.1.0 lib/ey-core/cli/status.rb