uffizzi-cli 0.11.3 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 180b017f63db77067a36ac80286e244bed3c363e9c884c6c65e7f0157c5342dd
4
- data.tar.gz: 024ad78f5e85209b2970324f68b8017f1a9fb919e3c9b7dcfbc31ef903dad548
3
+ metadata.gz: c27a1f65cd69d407dc2f086733a20baaf6e129b7433322ac61682f6b8a1fa54e
4
+ data.tar.gz: 61c6860dbc035009ee6197f353c05d0af95eda6d6f77b67d25f672ba954e114f
5
5
  SHA512:
6
- metadata.gz: d2c0eb580b2b290b03bbbab9069020b150929cdeb3eeca9ec10bd238b9325a48c77716b19f30e638435ad00c9c406a6d0d4bfa7049aa63afc7861233700d71a3
7
- data.tar.gz: 39bc279bb44a2ed422220d517fe104942efb17ccbcc0a7ee58bb0698b923aea2396d3cc493303cadc92cc723cba8114dde62bc3a9c4564e7e6e3b53ff17ac7d2
6
+ metadata.gz: 709d000e6701f32d3dcaa3745c68d2eb63695dba2dd8ef939201569605bb121fdd3422d730d3bdc2687a33cc81810b97a3a4f4841187aac68547824293523173
7
+ data.tar.gz: 1b0ae241adab3fb770f25cca8709ae779b5c8de16056fa71e6242d470123550b6cacc920f1e2b9474951323b72d1d18160a840ed64c4814469eb89e138d0c3d5
data/config/uffizzi.rb CHANGED
@@ -19,6 +19,7 @@ module Uffizzi
19
19
  google: 'UffizziCore::Credential::Google',
20
20
  amazon: 'UffizziCore::Credential::Amazon',
21
21
  github_registry: 'UffizziCore::Credential::GithubContainerRegistry',
22
+ docker_registry: 'UffizziCore::Credential::DockerRegistry',
22
23
  }
23
24
  config.default_server = 'app.uffizzi.com'
24
25
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'uffizzi'
4
+ require 'uffizzi/helpers/connect_helper'
4
5
 
5
6
  module Uffizzi
6
7
  class Cli::Connect < Thor
@@ -20,39 +21,76 @@ module Uffizzi
20
21
  desc 'docker-hub', 'Connect to Docker Hub (hub.docker.com)'
21
22
  method_option :skip_raise_existence_error, type: :boolean, default: false,
22
23
  desc: 'Skip raising an error within check the credential'
24
+ method_option :update_credential_if_exists, type: :boolean, default: false
25
+ method_option :username, type: :string, aliases: :u
26
+ method_option :password, type: :string, aliases: :p
23
27
  def docker_hub
24
28
  type = Uffizzi.configuration.credential_types[:dockerhub]
25
- check_credential_existence(type, 'docker-hub')
29
+ credential_exists = credential_exists?(type)
30
+ handle_existing_credential_options('docker-hub') if credential_exists
26
31
 
27
- username = ENV['DOCKERHUB_USERNAME'] || Uffizzi.ui.ask('Username: ')
28
- password = ENV['DOCKERHUB_PASSWORD'] || Uffizzi.ui.ask('Password: ', echo: false)
32
+ username, password = Uffizzi::ConnectHelper.get_docker_hub_data(options)
29
33
 
30
34
  params = {
31
35
  username: username,
32
36
  password: password,
33
- type: Uffizzi.configuration.credential_types[:dockerhub],
37
+ type: type,
34
38
  }
39
+ server = ConfigFile.read_option(:server)
40
+
41
+ response = if credential_exists
42
+ update_credential(server, params, type)
43
+ else
44
+ create_credential(server, params)
45
+ end
35
46
 
47
+ handle_result_for('Docker Hub', response)
48
+ end
49
+
50
+ desc 'docker-registry', 'Connect to any registry implementing the Docker Registry HTTP API protocol'
51
+ method_option :skip_raise_existence_error, type: :boolean, default: false,
52
+ desc: 'Skip raising an error within check the credential'
53
+ method_option :update_credential_if_exists, type: :boolean, default: false
54
+ method_option :registry, type: :string, aliases: :r
55
+ method_option :username, type: :string, aliases: :u
56
+ method_option :password, type: :string, aliases: :p
57
+ def docker_registry
58
+ type = Uffizzi.configuration.credential_types[:docker_registry]
59
+ credential_exists = credential_exists?(type)
60
+ handle_existing_credential_options('docker-registry') if credential_exists
61
+
62
+ registry_url, username, password = Uffizzi::ConnectHelper.get_docker_registry_data(options)
63
+
64
+ params = {
65
+ registry_url: prepare_registry_url(registry_url),
66
+ username: username,
67
+ password: password,
68
+ type: type,
69
+ }
36
70
  server = ConfigFile.read_option(:server)
37
- response = create_credential(server, params)
38
71
 
39
- if ResponseHelper.created?(response)
40
- print_success_message('DockerHub')
72
+ response = if credential_exists
73
+ update_credential(server, params, type)
41
74
  else
42
- ResponseHelper.handle_failed_response(response)
75
+ create_credential(server, params)
43
76
  end
77
+
78
+ handle_result_for('Docker Registry', response)
44
79
  end
45
80
 
46
81
  desc 'acr', 'Connect to Azure Container Registry (azurecr.io)'
47
82
  method_option :skip_raise_existence_error, type: :boolean, default: false,
48
83
  desc: 'Skip raising an error within check the credential'
84
+ method_option :update_credential_if_exists, type: :boolean, default: false
85
+ method_option :registry, type: :string, aliases: :r
86
+ method_option :username, type: :string, aliases: :u
87
+ method_option :password, type: :string, aliases: :p
49
88
  def acr
50
89
  type = Uffizzi.configuration.credential_types[:azure]
51
- check_credential_existence(type, 'acr')
90
+ credential_exists = credential_exists?(type)
91
+ handle_existing_credential_options('acr') if credential_exists
52
92
 
53
- registry_url = ENV['ACR_REGISTRY_URL'] || Uffizzi.ui.ask('Registry Domain: ')
54
- username = ENV['ACR_USERNAME'] || Uffizzi.ui.ask('Docker ID: ')
55
- password = ENV['ACR_PASSWORD'] || Uffizzi.ui.ask('Password/Access Token: ', echo: false)
93
+ registry_url, username, password = Uffizzi::ConnectHelper.get_acr_data(options)
56
94
 
57
95
  params = {
58
96
  username: username,
@@ -60,51 +98,56 @@ module Uffizzi
60
98
  registry_url: prepare_registry_url(registry_url),
61
99
  type: type,
62
100
  }
63
-
64
101
  server = ConfigFile.read_option(:server)
65
- response = create_credential(server, params)
66
102
 
67
- if ResponseHelper.created?(response)
68
- print_success_message('ACR')
103
+ response = if credential_exists
104
+ update_credential(server, params, type)
69
105
  else
70
- ResponseHelper.handle_failed_response(response)
106
+ create_credential(server, params)
71
107
  end
108
+
109
+ handle_result_for('ACR', response)
72
110
  end
73
111
 
74
112
  desc 'ecr', 'Connect to Amazon Elastic Container Registry'
75
113
  method_option :skip_raise_existence_error, type: :boolean, default: false,
76
114
  desc: 'Skip raising an error within check the credential'
115
+ method_option :update_credential_if_exists, type: :boolean, default: false
116
+ method_option :registry, type: :string, aliases: :r
117
+ method_option :id, type: :string
118
+ method_option :secret, type: :string, aliases: :s
77
119
  def ecr
78
120
  type = Uffizzi.configuration.credential_types[:amazon]
79
- check_credential_existence(type, 'ecr')
121
+ credential_exists = credential_exists?(type)
122
+ handle_existing_credential_options('ecr') if credential_exists
80
123
 
81
- registry_url = ENV['AWS_REGISTRY_URL'] || Uffizzi.ui.ask('Registry Domain: ')
82
- access_key = ENV['AWS_ACCESS_KEY_ID'] || Uffizzi.ui.ask('Access key ID: ')
83
- secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] || Uffizzi.ui.ask('Secret access key: ', echo: false)
124
+ registry_url, access_key_id, secret_access_key = Uffizzi::ConnectHelper.get_ecr_data(options)
84
125
 
85
126
  params = {
86
- username: access_key,
127
+ username: access_key_id,
87
128
  password: secret_access_key,
88
129
  registry_url: prepare_registry_url(registry_url),
89
130
  type: type,
90
131
  }
91
-
92
132
  server = ConfigFile.read_option(:server)
93
- response = create_credential(server, params)
94
133
 
95
- if ResponseHelper.created?(response)
96
- print_success_message('ECR')
134
+ response = if credential_exists
135
+ update_credential(server, params, type)
97
136
  else
98
- ResponseHelper.handle_failed_response(response)
137
+ create_credential(server, params)
99
138
  end
139
+
140
+ handle_result_for('ECR', response)
100
141
  end
101
142
 
102
143
  desc 'gcr', 'Connect to Google Container Registry (gcr.io)'
103
144
  method_option :skip_raise_existence_error, type: :boolean, default: false,
104
145
  desc: 'Skip raising an error within check the credential'
146
+ method_option :update_credential_if_exists, type: :boolean, default: false
105
147
  def gcr(credential_file_path = nil)
106
148
  type = Uffizzi.configuration.credential_types[:google]
107
- check_credential_existence(type, 'gcr')
149
+ credential_exists = credential_exists?(type)
150
+ handle_existing_credential_options('gcr') if credential_exists
108
151
 
109
152
  credential_content = google_service_account_content(credential_file_path)
110
153
 
@@ -112,71 +155,88 @@ module Uffizzi
112
155
  password: credential_content,
113
156
  type: type,
114
157
  }
115
-
116
158
  server = ConfigFile.read_option(:server)
117
- response = create_credential(server, params)
118
159
 
119
- if ResponseHelper.created?(response)
120
- print_success_message('GCR')
160
+ response = if credential_exists
161
+ update_credential(server, params, type)
121
162
  else
122
- ResponseHelper.handle_failed_response(response)
163
+ create_credential(server, params)
123
164
  end
165
+
166
+ handle_result_for('GCR', response)
124
167
  end
125
168
 
126
169
  desc 'ghcr', 'Connect to GitHub Container Registry (ghcr.io)'
127
170
  method_option :skip_raise_existence_error, type: :boolean, default: false,
128
171
  desc: 'Skip raising an error within check the credential'
172
+ method_option :update_credential_if_exists, type: :boolean, default: false
129
173
  method_option :username, type: :string, aliases: :u
130
174
  method_option :token, type: :string, aliases: :t
131
175
  def ghcr
132
176
  type = Uffizzi.configuration.credential_types[:github_registry]
133
- check_credential_existence(type, 'ghcr')
177
+ credential_exists = credential_exists?(type)
178
+ handle_existing_credential_options('ghcr') if credential_exists
134
179
 
135
- username = options[:username] || ENV['GITHUB_USERNAME'] || Uffizzi.ui.ask('Github Username:')
136
- password = options[:token] || ENV['GITHUB_ACCESS_TOKEN'] || Uffizzi.ui.ask('Access Token:', echo: false)
180
+ username, password = Uffizzi::ConnectHelper.get_ghcr_data(options)
137
181
 
138
182
  params = {
139
183
  username: username,
140
184
  password: password,
141
185
  type: type,
142
186
  }
143
-
144
187
  server = ConfigFile.read_option(:server)
145
- response = create_credential(server, params)
146
188
 
147
- if ResponseHelper.created?(response)
148
- print_success_message('GHCR')
189
+ response = if credential_exists
190
+ update_credential(server, params, type)
149
191
  else
150
- ResponseHelper.handle_failed_response(response)
192
+ create_credential(server, params)
151
193
  end
194
+
195
+ handle_result_for('GHCR', response)
152
196
  end
153
197
 
154
198
  map 'list-credentials' => 'list_credentials'
155
199
  map 'docker-hub' => 'docker_hub'
200
+ map 'docker-registry' => 'docker_registry'
156
201
 
157
202
  private
158
203
 
204
+ def handle_result_for(credential_type, response)
205
+ if ResponseHelper.created?(response) || ResponseHelper.ok?(response)
206
+ print_success_message(credential_type)
207
+ else
208
+ ResponseHelper.handle_failed_response(response)
209
+ end
210
+ end
211
+
159
212
  def prepare_registry_url(registry_url)
160
213
  return registry_url if registry_url.match?(/^(?:http(s)?:\/\/)/)
161
214
 
162
215
  "https://#{registry_url}"
163
216
  end
164
217
 
165
- def print_success_message(connection_name)
166
- Uffizzi.ui.say("Successfully connected to #{connection_name}")
218
+ def print_success_message(credential_type)
219
+ Uffizzi.ui.say("Successfully connected to #{credential_type}.")
167
220
  end
168
221
 
169
- def check_credential_existence(type, connection_name)
222
+ def credential_exists?(type)
170
223
  server = ConfigFile.read_option(:server)
171
224
  response = check_credential(server, type)
172
- return if ResponseHelper.ok?(response)
225
+ !ResponseHelper.ok?(response)
226
+ end
227
+
228
+ def handle_existing_credential_options(credential_type_slug)
229
+ if options.update_credential_if_exists?
230
+ Uffizzi.ui.say('Updating existing credential.')
231
+ return
232
+ end
173
233
 
174
234
  if options.skip_raise_existence_error?
175
- Uffizzi.ui.say("Credentials of type #{connection_name} already exist for this account.")
235
+ Uffizzi.ui.say("Credential of type #{credential_type_slug} already exists for this account.")
176
236
  exit(true)
177
237
  else
178
- message = "Credentials of type #{connection_name} already exist for this account. " \
179
- "To remove them, run $ uffizzi disconnect #{connection_name}."
238
+ message = "Credential of type #{credential_type_slug} already exists for this account.\n" \
239
+ "To remove them, run uffizzi disconnect #{credential_type_slug}."
180
240
  raise Uffizzi::Error.new(message)
181
241
  end
182
242
  end
@@ -204,7 +264,7 @@ module Uffizzi
204
264
  def google_service_account_content(credential_file_path = nil)
205
265
  return ENV['GCLOUD_SERVICE_KEY'] if ENV['GCLOUD_SERVICE_KEY']
206
266
 
207
- return Uffizzi.ui.say('Path to google service account key file wasn\'t specified.') if credential_file_path.nil?
267
+ raise Uffizzi::Error.new("Path to a google service account key file wasn't specified.") if credential_file_path.nil?
208
268
 
209
269
  begin
210
270
  credential_content = File.read(credential_file_path)
@@ -10,6 +10,8 @@ module Uffizzi
10
10
  connection_type = case credential_type
11
11
  when 'docker-hub'
12
12
  Uffizzi.configuration.credential_types[:dockerhub]
13
+ when 'docker-registry'
14
+ Uffizzi.configuration.credential_types[:docker_registry]
13
15
  when 'acr'
14
16
  Uffizzi.configuration.credential_types[:azure]
15
17
  when 'ecr'
@@ -25,7 +27,7 @@ module Uffizzi
25
27
  response = delete_credential(ConfigFile.read_option(:server), connection_type)
26
28
 
27
29
  if ResponseHelper.no_content?(response)
28
- Uffizzi.ui.say("Successfully disconnected #{connection_name(credential_type)} connection")
30
+ Uffizzi.ui.say("Successfully disconnected from #{connection_name(credential_type)}.")
29
31
  else
30
32
  ResponseHelper.handle_failed_response(response)
31
33
  end
@@ -36,6 +38,7 @@ module Uffizzi
36
38
  def connection_name(credential_type)
37
39
  {
38
40
  'docker-hub' => 'DockerHub',
41
+ 'docker-registry' => 'Docker Registry',
39
42
  'acr' => 'ACR',
40
43
  'ecr' => 'ECR',
41
44
  'gcr' => 'GCR',
@@ -70,6 +70,13 @@ module ApiClient
70
70
  build_response(response)
71
71
  end
72
72
 
73
+ def update_credential(server, params, type)
74
+ uri = credential_uri(server, type)
75
+ response = http_client.make_put_request(uri, params)
76
+
77
+ build_response(response)
78
+ end
79
+
73
80
  def fetch_deployment_services(server, project_slug, deployment_id)
74
81
  uri = preview_services_uri(server, project_slug, deployment_id)
75
82
  response = http_client.make_get_request(uri)
@@ -78,7 +85,7 @@ module ApiClient
78
85
  end
79
86
 
80
87
  def delete_credential(server, credential_type)
81
- uri = delete_credential_uri(server, credential_type)
88
+ uri = credential_uri(server, credential_type)
82
89
  response = http_client.make_delete_request(uri)
83
90
 
84
91
  build_response(response)
@@ -64,7 +64,7 @@ module ApiRoutes
64
64
  "#{server}/api/cli/v1/projects/#{project_slug}/deployments/#{deployment_id}/containers"
65
65
  end
66
66
 
67
- def delete_credential_uri(server, credential_type)
67
+ def credential_uri(server, credential_type)
68
68
  "#{server}/api/cli/v1/account/credentials/#{credential_type}"
69
69
  end
70
70
 
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Uffizzi
4
+ module ConnectHelper
5
+ class << self
6
+ def get_docker_registry_data(options)
7
+ registry_url = options[:registry] || ENV['DOCKER_REGISTRY_URL'] || Uffizzi.ui.ask('Registry Domain:')
8
+ username = options[:username] || ENV['DOCKER_REGISTRY_USERNAME'] || Uffizzi.ui.ask('Username:')
9
+ password = options[:password] || ENV['DOCKER_REGISTRY_PASSWORD'] || Uffizzi.ui.ask('Password:', echo: false)
10
+
11
+ [registry_url, username, password]
12
+ end
13
+
14
+ def get_docker_hub_data(options)
15
+ username = options[:username] || ENV['DOCKERHUB_USERNAME'] || Uffizzi.ui.ask('Username:')
16
+ password = options[:password] || ENV['DOCKERHUB_PASSWORD'] || Uffizzi.ui.ask('Password:', echo: false)
17
+
18
+ [username, password]
19
+ end
20
+
21
+ def get_acr_data(options)
22
+ registry_url = options[:registry] || ENV['ACR_REGISTRY_URL'] || Uffizzi.ui.ask('Registry Domain:')
23
+ username = options[:username] || ENV['ACR_USERNAME'] || Uffizzi.ui.ask('Docker ID:')
24
+ password = options[:password] || ENV['ACR_PASSWORD'] || Uffizzi.ui.ask('Password/Access Token:', echo: false)
25
+
26
+ [registry_url, username, password]
27
+ end
28
+
29
+ def get_ecr_data(options)
30
+ registry_url = options[:registry] || ENV['AWS_REGISTRY_URL'] || Uffizzi.ui.ask('Registry Domain:')
31
+ access_key_id = options[:id] || ENV['AWS_ACCESS_KEY_ID'] || Uffizzi.ui.ask('Access key ID:')
32
+ secret_access_key = options[:secret] || ENV['AWS_SECRET_ACCESS_KEY'] || Uffizzi.ui.ask('Secret access key:', echo: false)
33
+
34
+ [registry_url, access_key_id, secret_access_key]
35
+ end
36
+
37
+ def get_ghcr_data(options)
38
+ username = options[:username] || ENV['GITHUB_USERNAME'] || Uffizzi.ui.ask('Github Username:')
39
+ password = options[:token] || ENV['GITHUB_ACCESS_TOKEN'] || Uffizzi.ui.ask('Access Token:', echo: false)
40
+
41
+ [username, password]
42
+ end
43
+ end
44
+ end
45
+ end
@@ -92,7 +92,7 @@ class ComposeFileService
92
92
 
93
93
  def parse_compose_content_to_object(compose_content)
94
94
  begin
95
- compose_data = Psych.safe_load(compose_content)
95
+ compose_data = Psych.safe_load(compose_content, aliases: true)
96
96
  rescue Psych::SyntaxError
97
97
  Uffizzi.ui.say('Invalid compose file')
98
98
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uffizzi
4
- VERSION = '0.11.3'
4
+ VERSION = '0.12.0'
5
5
  end
data/man/uffizzi-connect CHANGED
@@ -1,37 +1,42 @@
1
1
  .\" generated with Ronn-NG/v0.9.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.9.1
3
- .TH "UFFIZZI\-CONNECT" "" "July 2022" ""
3
+ .TH "UFFIZZI\-CONNECT" "" "August 2022" ""
4
4
  .SH "NAME"
5
5
  \fBuffizzi\-connect\fR \- grant a Uffizzi user account access to external services
6
6
  .SH "SYNOPSIS"
7
- .nf
8
- uffizzi connect COMMAND
9
- .fi
7
+ \fBuffizzi connect\fR COMMAND [\-\-skip\-raise\-existence\-error] [\-\-update\-credential\-if\-exists]
10
8
  .SH "DESCRIPTION"
11
- .nf
12
- Grants a Uffizzi user account access to external services
13
-
9
+ Grants a Uffizzi user account access to external services\.
10
+ .P
14
11
  For more information on connecting to external services, see:
12
+ .br
15
13
  https://github\.com/UffizziCloud/uffizzi_cli
16
- .fi
17
14
  .SH "COMMANDS"
18
- .nf
19
15
  COMMAND is one of the following:
20
-
21
- acr
22
- Connect to Azure Container Registry (azurecr\.io)\.
23
-
24
- docker\-hub
25
- Connect to Docker Hub (hub\.docker\.com)\.
26
-
27
- ecr
28
- Connect to Amazon Elastic Container Registry (amazonaws\.com)\.
29
-
30
- gcr
31
- Connect to Google Container Registry (gcr\.io)\.
32
-
33
- ghcr
34
- Connect to GitHub Container Registry (ghcr\.io)\.
35
- .fi
16
+ .TP
17
+ \fBacr\fR
18
+ Connect to Azure Container Registry (azurecr\.io)\.
19
+ .TP
20
+ \fBdocker\-hub\fR
21
+ Connect to Docker Hub (hub\.docker\.com)\.
22
+ .TP
23
+ \fBdocker\-registry\fR
24
+ Connect to any registry implementing the Docker Registry HTTP API protocol
25
+ .TP
26
+ \fBecr\fR
27
+ Connect to Amazon Elastic Container Registry (amazonaws\.com)\.
28
+ .TP
29
+ \fBgcr\fR
30
+ Connect to Google Container Registry (gcr\.io)\.
31
+ .TP
32
+ \fBghcr\fR
33
+ Connect to GitHub Container Registry (ghcr\.io)\.
34
+ .SH "FLAGS"
35
+ .TP
36
+ \fB\-\-skip\-raise\-existence\-error\fR
37
+ If credential exists, do not raise an exception, just print a message\.
38
+ .TP
39
+ \fB\-\-update\-credential\-if\-exists\fR
40
+ Update credential if it exists\.
36
41
  .P
37
- Run \'uffizzi connect COMMAND \-\-help\' for more information on a command\.
42
+ Run \fBuffizzi connect COMMAND \-\-help\fR for more information on a command\.
@@ -1,35 +1,37 @@
1
1
  .\" generated with Ronn-NG/v0.9.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.9.1
3
- .TH "UFFIZZI\-CONNECT\-ACR" "" "May 2022" ""
3
+ .TH "UFFIZZI\-CONNECT\-ACR" "" "August 2022" ""
4
4
  .SH "NAME"
5
5
  \fBuffizzi\-connect\-acr\fR \- grant a Uffizzi user account access to a private Azure Container Registry (ACR)
6
6
  .SH "SYNOPSIS"
7
- .nf
8
- uffizzi connect acr
9
- .fi
7
+ \fBuffizzi connect acr\fR [\-\-registry=REGISTRY] [\-\-username=USERNAME] [\-\-password=PASSWORD]
10
8
  .SH "DESCRIPTION"
11
- .nf
12
- Given valid credentials, grants a Uffizzi user account access
13
- to a private Azure Container Registry
14
-
15
- This command can fail for the following reasons:
16
- \- The active user does not have permission to connect
17
- external services\.
18
- \- The given credentials are invalid\.
19
-
9
+ Given valid credentials, grants a Uffizzi user account access to a private Azure Container Registry
10
+ .P
11
+ Credentials can be provided interactively or non\-interactively via command options or environment variables:
12
+ .br
13
+ \fBACR_REGISTRY_URL\fR, \fBACR_REGISTRY_USERNAME\fR, \fBACR_REGISTRY_PASSWORD\fR
14
+ .P
15
+ This command can fail for the following reasons: \- The active user does not have permission to connect external services\. \- The given credentials are invalid\.
16
+ .P
20
17
  For more information on connecting to external services, see:
18
+ .br
21
19
  https://github\.com/UffizziCloud/uffizzi_cli
22
-
23
- For detailed instructions on configuring webhooks to send push
24
- notifications to Uffizzi, see
20
+ .P
21
+ For detailed instructions on configuring webhooks to send push notifications to Uffizzi, see:
22
+ .br
25
23
  https://docs\.uffizzi\.com/guides/container\-registry\-integrations
26
- .fi
24
+ .SH "OPTIONS"
25
+ .TP
26
+ \fB\-r\fR, \fB\-\-registry=<registry>\fR
27
+ URL of the service\.
28
+ .TP
29
+ \fB\-u\fR, \fB\-\-username=<username>\fR
30
+ Username for the service\.
31
+ .TP
32
+ \fB\-p\fR, \fB\-\-password=<password>\fR
33
+ Password for the service\.
27
34
  .SH "EXAMPLES"
28
- .nf
29
- The following command will prompt the user to enter ACR
30
- credentials, including registry domain, Docker ID and
31
- password or access token:
32
-
33
- $ uffizzi connect acr
34
- .fi
35
-
35
+ The following command will prompt the user to enter ACR credentials, including registry domain, Docker ID and password or access token:
36
+ .P
37
+ \fBuffizzi connect acr\fR
@@ -1,28 +1,42 @@
1
- uffizzi-connect-acr - grant a Uffizzi user account access to a private Azure Container Registry (ACR)
2
- ================================================================
1
+ # uffizzi-connect-acr - grant a Uffizzi user account access to a private Azure Container Registry (ACR)
3
2
 
4
3
  ## SYNOPSIS
5
- uffizzi connect acr
4
+
5
+ `uffizzi connect acr` [--registry=REGISTRY] [--username=USERNAME] [--password=PASSWORD]
6
6
 
7
7
  ## DESCRIPTION
8
- Given valid credentials, grants a Uffizzi user account access
9
- to a private Azure Container Registry
10
8
 
11
- This command can fail for the following reasons:
12
- - The active user does not have permission to connect
13
- external services.
14
- - The given credentials are invalid.
9
+ Given valid credentials, grants a Uffizzi user account access
10
+ to a private Azure Container Registry
11
+
12
+ Credentials can be provided interactively or non-interactively
13
+ via command options or environment variables:
14
+ `ACR_REGISTRY_URL`, `ACR_REGISTRY_USERNAME`, `ACR_REGISTRY_PASSWORD`
15
+
16
+ This command can fail for the following reasons:
17
+ - The active user does not have permission to connect external services.
18
+ - The given credentials are invalid.
19
+
20
+ For more information on connecting to external services, see:
21
+ https://github.com/UffizziCloud/uffizzi_cli
15
22
 
16
- For more information on connecting to external services, see:
17
- https://github.com/UffizziCloud/uffizzi_cli
23
+ For detailed instructions on configuring webhooks to send push
24
+ notifications to Uffizzi, see:
25
+ https://docs.uffizzi.com/guides/container-registry-integrations
18
26
 
19
- For detailed instructions on configuring webhooks to send push
20
- notifications to Uffizzi, see
21
- https://docs.uffizzi.com/guides/container-registry-integrations
27
+ ## OPTIONS
28
+
29
+ * `-r`, `--registry=<registry>`:
30
+ URL of the service.
31
+ * `-u`, `--username=<username>`:
32
+ Username for the service.
33
+ * `-p`, `--password=<password>`:
34
+ Password for the service.
22
35
 
23
36
  ## EXAMPLES
24
- The following command will prompt the user to enter ACR
25
- credentials, including registry domain, Docker ID and
26
- password or access token:
27
-
28
- $ uffizzi connect acr
37
+
38
+ The following command will prompt the user to enter ACR
39
+ credentials, including registry domain, Docker ID and
40
+ password or access token:
41
+
42
+ `uffizzi connect acr`