Module: Uffizzi::ConnectHelper
- Defined in:
- lib/uffizzi/helpers/connect_helper.rb
Class Method Summary collapse
- .get_acr_data(options) ⇒ Object
- .get_docker_hub_data(options) ⇒ Object
- .get_docker_registry_data(options) ⇒ Object
- .get_ecr_data(options) ⇒ Object
- .get_ghcr_data(options) ⇒ Object
Class Method Details
.get_acr_data(options) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/uffizzi/helpers/connect_helper.rb', line 21 def get_acr_data() registry_url = [:registry] || ENV['ACR_REGISTRY_URL'] || Uffizzi.ui.ask('Registry Domain:') username = [:username] || ENV['ACR_USERNAME'] || Uffizzi.ui.ask('Docker ID:') password = [:password] || ENV['ACR_PASSWORD'] || Uffizzi.ui.ask('Password/Access Token:', echo: false) [registry_url, username, password] end |
.get_docker_hub_data(options) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/uffizzi/helpers/connect_helper.rb', line 14 def get_docker_hub_data() username = [:username] || ENV['DOCKERHUB_USERNAME'] || Uffizzi.ui.ask('Username:') password = [:password] || ENV['DOCKERHUB_PASSWORD'] || Uffizzi.ui.ask('Password:', echo: false) [username, password] end |
.get_docker_registry_data(options) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/uffizzi/helpers/connect_helper.rb', line 6 def get_docker_registry_data() registry_url = [:registry] || ENV['DOCKER_REGISTRY_URL'] || Uffizzi.ui.ask('Registry Domain:') username = [:username] || ENV['DOCKER_REGISTRY_USERNAME'] || Uffizzi.ui.ask('Username:') password = [:password] || ENV['DOCKER_REGISTRY_PASSWORD'] || Uffizzi.ui.ask('Password:', echo: false) [registry_url, username, password] end |
.get_ecr_data(options) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/uffizzi/helpers/connect_helper.rb', line 29 def get_ecr_data() registry_url = [:registry] || ENV['AWS_REGISTRY_URL'] || Uffizzi.ui.ask('Registry Domain:') access_key_id = [:id] || ENV['AWS_ACCESS_KEY_ID'] || Uffizzi.ui.ask('Access key ID:') secret_access_key = [:secret] || ENV['AWS_SECRET_ACCESS_KEY'] || Uffizzi.ui.ask('Secret access key:', echo: false) [registry_url, access_key_id, secret_access_key] end |
.get_ghcr_data(options) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/uffizzi/helpers/connect_helper.rb', line 37 def get_ghcr_data() username = [:username] || ENV['GITHUB_USERNAME'] || Uffizzi.ui.ask('Github Username:') password = [:token] || ENV['GITHUB_ACCESS_TOKEN'] || Uffizzi.ui.ask('Access Token:', echo: false) [username, password] end |