Class: Stax::Aws::Ecr
Constant Summary
Constants inherited from Sdk
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
14 15 16 |
# File 'lib/stax/aws/ecr.rb', line 14 def auth client.. end |
.client ⇒ Object
10 11 12 |
# File 'lib/stax/aws/ecr.rb', line 10 def client @_client ||= ::Aws::ECR::Client.new end |
.exists?(repo, tag) ⇒ Boolean
24 25 26 |
# File 'lib/stax/aws/ecr.rb', line 24 def exists?(repo, tag) !client.batch_get_image(repository_name: repo, image_ids: [{image_tag: tag}]).images.empty? end |
.images(opt = {}) ⇒ Object
33 34 35 36 37 |
# File 'lib/stax/aws/ecr.rb', line 33 def images(opt = {}) paginate(:image_details) do |next_token| client.describe_images(opt.merge(next_token: next_token)) end end |
.login(*registry_ids) ⇒ Object
28 29 30 31 |
# File 'lib/stax/aws/ecr.rb', line 28 def login(*registry_ids) ids = registry_ids.empty? ? nil : Array(registry_ids) client.(registry_ids: ids). end |
.repositories(opt = {}) ⇒ Object
18 19 20 21 22 |
# File 'lib/stax/aws/ecr.rb', line 18 def repositories(opt = {}) paginate(:repositories) do |next_token| client.describe_repositories(opt.merge(next_token: next_token)) end end |