Class: Awshark::Ecs::Subcommand
- Inherits:
-
Thor
- Object
- Thor
- Awshark::Ecs::Subcommand
- Includes:
- ClassOptions
- Defined in:
- lib/awshark/ecs/subcommand.rb
Instance Method Summary collapse
Methods included from ClassOptions
Instance Method Details
#list ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/awshark/ecs/subcommand.rb', line 20 def list manager = Awshark::Ecs::Manager.new manager.clusters.each do |cluster| puts "\n" puts manager.inspect_cluster(cluster) cluster.services.each do |service| puts manager.inspect_service(service) end end end |
#login ⇒ Object
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/awshark/ecs/subcommand.rb', line 39 def login response = client. token = Base64.decode64(response..first.) user_name = token.split(':').first password = token.split(':').last url = "https://#{Awshark.config.sts.aws_account_id}.dkr.ecr.eu-central-1.amazonaws.com" `docker login -u #{user_name} -p #{password} #{url}` end |