Class: Stax::Cmd::Ecr

Inherits:
SubCommand show all
Defined in:
lib/stax/mixin/ecr.rb

Instance Method Summary collapse

Methods inherited from SubCommand

#info, stax_info, stax_info_tasks

Instance Method Details

#imagesObject



56
57
58
59
60
61
62
63
# File 'lib/stax/mixin/ecr.rb', line 56

def images
  (options[:repositories] || my.ecr_repository_names).each do |repo|
    debug("Images in repo #{repo}")
    print_table Aws::Ecr.images(repository_name: repo).map { |i|
      [i.image_tags.join(' '), i.image_digest, human_bytes(i.image_size_in_bytes), i.image_pushed_at]
    }
  end
end

#loginObject

TODO: reimplement using –password-stdin



38
# File 'lib/stax/mixin/ecr.rb', line 38

desc 'login', 'login to ECR registry'

#registryObject



33
34
35
# File 'lib/stax/mixin/ecr.rb', line 33

def registry
  puts my.ecr_registry
end

#repositoriesObject



48
49
50
51
52
# File 'lib/stax/mixin/ecr.rb', line 48

def repositories
  print_table Aws::Ecr.repositories(repository_names: my.ecr_repository_names).map { |r|
    [r.repository_name, r.repository_uri, r.created_at]
  }
end