Class: Stax::Aws::Ecr
Class Method Summary collapse
- .auth ⇒ Object
- .client ⇒ Object
- .exists?(repo, tag) ⇒ Boolean
- .images(opt = {}) ⇒ Object
- .login(*registry_ids) ⇒ Object
- .repositories(opt = {}) ⇒ Object
Methods inherited from Sdk
Class Method Details
.auth ⇒ Object
13 14 15 |
# File 'lib/stax/aws/ecr.rb', line 13 def auth client.. end |
.client ⇒ Object
9 10 11 |
# File 'lib/stax/aws/ecr.rb', line 9 def client @_client ||= ::Aws::ECR::Client.new end |
.exists?(repo, tag) ⇒ Boolean
23 24 25 |
# File 'lib/stax/aws/ecr.rb', line 23 def exists?(repo, tag) !client.batch_get_image(repository_name: repo, image_ids: [{image_tag: tag}]).images.empty? end |
.images(opt = {}) ⇒ Object
32 33 34 35 36 |
# File 'lib/stax/aws/ecr.rb', line 32 def images(opt = {}) paginate(:image_details) do |next_token| client.describe_images(opt.merge(next_token: next_token)) end end |
.login(*registry_ids) ⇒ Object
27 28 29 30 |
# File 'lib/stax/aws/ecr.rb', line 27 def login(*registry_ids) ids = registry_ids.empty? ? nil : Array(registry_ids) client.(registry_ids: ids). end |
.repositories(opt = {}) ⇒ Object
17 18 19 20 21 |
# File 'lib/stax/aws/ecr.rb', line 17 def repositories(opt = {}) paginate(:repositories) do |next_token| client.describe_repositories(opt.merge(next_token: next_token)) end end |