uffizzi-cli 0.14.0 → 1.0.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 +4 -4
- data/lib/uffizzi/cli/connect.rb +29 -15
- data/lib/uffizzi/cli/disconnect.rb +1 -1
- data/lib/uffizzi/cli/login.rb +8 -3
- data/lib/uffizzi/cli/login_by_identity_token.rb +47 -0
- data/lib/uffizzi/cli/project.rb +3 -1
- data/lib/uffizzi/cli.rb +8 -0
- data/lib/uffizzi/clients/api/api_client.rb +19 -12
- data/lib/uffizzi/clients/api/api_routes.rb +14 -6
- data/lib/uffizzi/services/project_service.rb +1 -0
- data/lib/uffizzi/version.rb +1 -1
- data/man/uffizzi-login-by-identity-token +29 -0
- data/man/uffizzi-login-by-identity-token.html +106 -0
- data/man/uffizzi-login-by-identity-token.ronn +21 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac2d58dae4db13ed788532732a92f9d4a317780cb4b80ef07d185f899d10749d
|
4
|
+
data.tar.gz: a1b4b37db41936eabb930febe701186027a80d0684ca371ed442168caecea779
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2420a93b4b17a5efb2de11ed5a998070da7eb2f8f22a2d09bf2598b4eb88841f428f0a87cf7de7c5b49e289f12f2d85413aa96600ca3726b71b5ec962e6b68c
|
7
|
+
data.tar.gz: 2dff8bd8e614d8ffaad6a2b42f528844c5a6d1232c2327bcb756c8ae6d4b014e3b310965f01fd86dc2d6eb40cb9aaab10755ef707a0dc808538620581b1f09cb
|
data/lib/uffizzi/cli/connect.rb
CHANGED
@@ -10,7 +10,8 @@ module Uffizzi
|
|
10
10
|
desc 'list-credentials', 'List existing credentials for an account'
|
11
11
|
def list_credentials
|
12
12
|
server = ConfigFile.read_option(:server)
|
13
|
-
|
13
|
+
account_id = ConfigFile.read_option(:account_id)
|
14
|
+
response = fetch_credentials(server, account_id)
|
14
15
|
if ResponseHelper.ok?(response)
|
15
16
|
handle_list_credentials_success(response)
|
16
17
|
else
|
@@ -37,11 +38,12 @@ module Uffizzi
|
|
37
38
|
type: type,
|
38
39
|
}
|
39
40
|
server = ConfigFile.read_option(:server)
|
41
|
+
account_id = ConfigFile.read_option(:account_id)
|
40
42
|
|
41
43
|
response = if credential_exists
|
42
|
-
update_credential(server, params, type)
|
44
|
+
update_credential(server, account_id, params, type)
|
43
45
|
else
|
44
|
-
create_credential(server, params)
|
46
|
+
create_credential(server, account_id, params)
|
45
47
|
end
|
46
48
|
|
47
49
|
handle_result_for('Docker Hub', response)
|
@@ -68,11 +70,12 @@ module Uffizzi
|
|
68
70
|
type: type,
|
69
71
|
}
|
70
72
|
server = ConfigFile.read_option(:server)
|
73
|
+
account_id = ConfigFile.read_option(:account_id)
|
71
74
|
|
72
75
|
response = if credential_exists
|
73
|
-
update_credential(server, params, type)
|
76
|
+
update_credential(server, account_id, params, type)
|
74
77
|
else
|
75
|
-
create_credential(server, params)
|
78
|
+
create_credential(server, account_id, params)
|
76
79
|
end
|
77
80
|
|
78
81
|
handle_result_for('Docker Registry', response)
|
@@ -99,11 +102,12 @@ module Uffizzi
|
|
99
102
|
type: type,
|
100
103
|
}
|
101
104
|
server = ConfigFile.read_option(:server)
|
105
|
+
account_id = ConfigFile.read_option(:account_id)
|
102
106
|
|
103
107
|
response = if credential_exists
|
104
|
-
update_credential(server, params, type)
|
108
|
+
update_credential(server, account_id, params, type)
|
105
109
|
else
|
106
|
-
create_credential(server, params)
|
110
|
+
create_credential(server, account_id, params)
|
107
111
|
end
|
108
112
|
|
109
113
|
handle_result_for('ACR', response)
|
@@ -130,11 +134,12 @@ module Uffizzi
|
|
130
134
|
type: type,
|
131
135
|
}
|
132
136
|
server = ConfigFile.read_option(:server)
|
137
|
+
account_id = ConfigFile.read_option(:account_id)
|
133
138
|
|
134
139
|
response = if credential_exists
|
135
|
-
update_credential(server, params, type)
|
140
|
+
update_credential(server, account_id, params, type)
|
136
141
|
else
|
137
|
-
create_credential(server, params)
|
142
|
+
create_credential(server, account_id, params)
|
138
143
|
end
|
139
144
|
|
140
145
|
handle_result_for('ECR', response)
|
@@ -156,11 +161,12 @@ module Uffizzi
|
|
156
161
|
type: type,
|
157
162
|
}
|
158
163
|
server = ConfigFile.read_option(:server)
|
164
|
+
account_id = ConfigFile.read_option(:account_id)
|
159
165
|
|
160
166
|
response = if credential_exists
|
161
|
-
update_credential(server, params, type)
|
167
|
+
update_credential(server, account_id, params, type)
|
162
168
|
else
|
163
|
-
create_credential(server, params)
|
169
|
+
create_credential(server, account_id, params)
|
164
170
|
end
|
165
171
|
|
166
172
|
handle_result_for('GCR', response)
|
@@ -185,11 +191,12 @@ module Uffizzi
|
|
185
191
|
type: type,
|
186
192
|
}
|
187
193
|
server = ConfigFile.read_option(:server)
|
194
|
+
account_id = ConfigFile.read_option(:account_id)
|
188
195
|
|
189
196
|
response = if credential_exists
|
190
|
-
update_credential(server, params, type)
|
197
|
+
update_credential(server, account_id, params, type)
|
191
198
|
else
|
192
|
-
create_credential(server, params)
|
199
|
+
create_credential(server, account_id, params)
|
193
200
|
end
|
194
201
|
|
195
202
|
handle_result_for('GHCR', response)
|
@@ -221,8 +228,15 @@ module Uffizzi
|
|
221
228
|
|
222
229
|
def credential_exists?(type)
|
223
230
|
server = ConfigFile.read_option(:server)
|
224
|
-
|
225
|
-
|
231
|
+
account_id = ConfigFile.read_option(:account_id)
|
232
|
+
response = check_credential(server, account_id, type)
|
233
|
+
return false if ResponseHelper.ok?(response)
|
234
|
+
return true if ResponseHelper.unprocessable_entity?(response)
|
235
|
+
|
236
|
+
if ResponseHelper.forbidden?(response)
|
237
|
+
Uffizzi.ui.say('Unauthorized. Skipping credentials action.')
|
238
|
+
exit(true)
|
239
|
+
end
|
226
240
|
end
|
227
241
|
|
228
242
|
def handle_existing_credential_options(credential_type_slug)
|
@@ -24,7 +24,7 @@ module Uffizzi
|
|
24
24
|
raise Uffizzi::Error.new('Unsupported credential type.')
|
25
25
|
end
|
26
26
|
|
27
|
-
response = delete_credential(ConfigFile.read_option(:server), connection_type)
|
27
|
+
response = delete_credential(ConfigFile.read_option(:server), ConfigFile.read_option(:account_id), connection_type)
|
28
28
|
|
29
29
|
if ResponseHelper.no_content?(response)
|
30
30
|
Uffizzi.ui.say("Successfully disconnected from #{connection_name(credential_type)}.")
|
data/lib/uffizzi/cli/login.rb
CHANGED
@@ -61,6 +61,7 @@ module Uffizzi
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def handle_succeed_response(response, server, username)
|
64
|
+
# TODO Choose a personal account
|
64
65
|
account = response[:body][:user][:accounts].first
|
65
66
|
return Uffizzi.ui.say('No account related to this email') unless account_valid?(account)
|
66
67
|
|
@@ -95,9 +96,11 @@ module Uffizzi
|
|
95
96
|
end
|
96
97
|
all_choices = choices + [{ name: 'Create a new project', value: nil }]
|
97
98
|
answer = Uffizzi.prompt.select(question, all_choices)
|
98
|
-
return
|
99
|
+
return create_new_project(server) unless answer
|
99
100
|
|
100
|
-
|
101
|
+
account_id = projects.detect { |project| project[:slug] == answer }[:account_id]
|
102
|
+
ConfigFile.write_option(:project, answer)
|
103
|
+
ConfigFile.write_option(:account_id, account_id)
|
101
104
|
end
|
102
105
|
|
103
106
|
def create_new_project(server)
|
@@ -116,7 +119,8 @@ module Uffizzi
|
|
116
119
|
},
|
117
120
|
}
|
118
121
|
|
119
|
-
|
122
|
+
account_id = ConfigFile.read_option(:account_id)
|
123
|
+
response = create_project(server, account_id, params)
|
120
124
|
|
121
125
|
if ResponseHelper.created?(response)
|
122
126
|
handle_create_project_succeess(response)
|
@@ -139,6 +143,7 @@ module Uffizzi
|
|
139
143
|
project = response[:body][:project]
|
140
144
|
|
141
145
|
ConfigFile.write_option(:project, project[:slug])
|
146
|
+
ConfigFile.write_option(:account_id, project[:account_id])
|
142
147
|
|
143
148
|
Uffizzi.ui.say("Project #{project[:name]} was successfully created")
|
144
149
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'uffizzi'
|
4
|
+
require 'uffizzi/response_helper'
|
5
|
+
require 'uffizzi/clients/api/api_client'
|
6
|
+
|
7
|
+
module Uffizzi
|
8
|
+
class Cli::LoginByIdentityToken
|
9
|
+
include ApiClient
|
10
|
+
|
11
|
+
def initialize(options)
|
12
|
+
@options = options
|
13
|
+
end
|
14
|
+
|
15
|
+
def run
|
16
|
+
token = @options[:token]
|
17
|
+
server = @options[:server]
|
18
|
+
params = prepare_request_params(token)
|
19
|
+
response = create_ci_session(server, params)
|
20
|
+
|
21
|
+
if ResponseHelper.created?(response)
|
22
|
+
handle_succeed_response(response, server)
|
23
|
+
else
|
24
|
+
ResponseHelper.handle_failed_response(response)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def prepare_request_params(token)
|
31
|
+
{
|
32
|
+
user: {
|
33
|
+
token: token,
|
34
|
+
},
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
def handle_succeed_response(response, server)
|
39
|
+
ConfigFile.write_option(:server, server)
|
40
|
+
ConfigFile.write_option(:cookie, response[:headers])
|
41
|
+
ConfigFile.write_option(:account_id, response[:body][:account_id])
|
42
|
+
ConfigFile.write_option(:project, response[:body][:project_slug])
|
43
|
+
|
44
|
+
Uffizzi.ui.say('Successful Login by Identity Token')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/lib/uffizzi/cli/project.rb
CHANGED
@@ -102,12 +102,13 @@ module Uffizzi
|
|
102
102
|
raise Uffizzi::Error.new('Slug must not content spaces or special characters') unless slug.match?(/^[a-zA-Z0-9\-_]+\Z/i)
|
103
103
|
|
104
104
|
server = ConfigFile.read_option(:server)
|
105
|
+
account_id = ConfigFile.read_option(:account_id)
|
105
106
|
params = {
|
106
107
|
name: name,
|
107
108
|
description: options[:description],
|
108
109
|
slug: slug,
|
109
110
|
}
|
110
|
-
response = create_project(server, params)
|
111
|
+
response = create_project(server, account_id, params)
|
111
112
|
|
112
113
|
if ResponseHelper.created?(response)
|
113
114
|
handle_create_success_response(response)
|
@@ -165,6 +166,7 @@ module Uffizzi
|
|
165
166
|
|
166
167
|
def set_default_project(project)
|
167
168
|
ConfigFile.write_option(:project, project[:slug])
|
169
|
+
ConfigFile.write_option(:account_id, project[:account_id])
|
168
170
|
end
|
169
171
|
end
|
170
172
|
end
|
data/lib/uffizzi/cli.rb
CHANGED
@@ -24,6 +24,14 @@ module Uffizzi
|
|
24
24
|
Login.new(options).run
|
25
25
|
end
|
26
26
|
|
27
|
+
desc 'login_by_identity_token [OPTIONS]', 'Login or register to Uffizzi to view and manage your previews'
|
28
|
+
method_option :server, required: true, aliases: '-s'
|
29
|
+
method_option :token, required: true, aliases: '-t'
|
30
|
+
def login_by_identity_token
|
31
|
+
require_relative 'cli/login_by_identity_token'
|
32
|
+
LoginByIdentityToken.new(options).run
|
33
|
+
end
|
34
|
+
|
27
35
|
desc 'logout', 'Log out of a Uffizzi user account'
|
28
36
|
def logout
|
29
37
|
require_relative 'cli/logout'
|
@@ -13,6 +13,13 @@ module ApiClient
|
|
13
13
|
build_response(response)
|
14
14
|
end
|
15
15
|
|
16
|
+
def create_ci_session(server, params = {})
|
17
|
+
uri = ci_session_uri(server)
|
18
|
+
response = http_client.make_post_request(uri, params)
|
19
|
+
|
20
|
+
build_response(response)
|
21
|
+
end
|
22
|
+
|
16
23
|
def destroy_session(server)
|
17
24
|
uri = session_uri(server)
|
18
25
|
response = http_client.make_delete_request(uri)
|
@@ -27,16 +34,16 @@ module ApiClient
|
|
27
34
|
build_response(response)
|
28
35
|
end
|
29
36
|
|
30
|
-
def fetch_credentials(server)
|
31
|
-
uri = credentials_uri(server)
|
37
|
+
def fetch_credentials(server, account_id)
|
38
|
+
uri = credentials_uri(server, account_id)
|
32
39
|
|
33
40
|
response = http_client.make_get_request(uri)
|
34
41
|
|
35
42
|
build_response(response)
|
36
43
|
end
|
37
44
|
|
38
|
-
def check_credential(server, type)
|
39
|
-
uri = check_credential_uri(server, type)
|
45
|
+
def check_credential(server, account_id, type)
|
46
|
+
uri = check_credential_uri(server, account_id, type)
|
40
47
|
response = http_client.make_get_request(uri)
|
41
48
|
|
42
49
|
build_response(response)
|
@@ -49,8 +56,8 @@ module ApiClient
|
|
49
56
|
build_response(response)
|
50
57
|
end
|
51
58
|
|
52
|
-
def create_project(server, params)
|
53
|
-
uri =
|
59
|
+
def create_project(server, account_id, params)
|
60
|
+
uri = create_projects_uri(server, account_id)
|
54
61
|
response = http_client.make_post_request(uri, params)
|
55
62
|
|
56
63
|
build_response(response)
|
@@ -63,15 +70,15 @@ module ApiClient
|
|
63
70
|
build_response(response)
|
64
71
|
end
|
65
72
|
|
66
|
-
def create_credential(server, params)
|
67
|
-
uri = credentials_uri(server)
|
73
|
+
def create_credential(server, account_id, params)
|
74
|
+
uri = credentials_uri(server, account_id)
|
68
75
|
response = http_client.make_post_request(uri, params)
|
69
76
|
|
70
77
|
build_response(response)
|
71
78
|
end
|
72
79
|
|
73
|
-
def update_credential(server, params, type)
|
74
|
-
uri = credential_uri(server, type)
|
80
|
+
def update_credential(server, account_id, params, type)
|
81
|
+
uri = credential_uri(server, account_id, type)
|
75
82
|
response = http_client.make_put_request(uri, params)
|
76
83
|
|
77
84
|
build_response(response)
|
@@ -84,8 +91,8 @@ module ApiClient
|
|
84
91
|
build_response(response)
|
85
92
|
end
|
86
93
|
|
87
|
-
def delete_credential(server, credential_type)
|
88
|
-
uri = credential_uri(server, credential_type)
|
94
|
+
def delete_credential(server, account_id, credential_type)
|
95
|
+
uri = credential_uri(server, account_id, credential_type)
|
89
96
|
response = http_client.make_delete_request(uri)
|
90
97
|
|
91
98
|
build_response(response)
|
@@ -15,6 +15,10 @@ module ApiRoutes
|
|
15
15
|
"#{server}/api/cli/v1/projects"
|
16
16
|
end
|
17
17
|
|
18
|
+
def create_projects_uri(server, account_id)
|
19
|
+
"#{server}/api/cli/v1/accounts/#{account_id}/projects"
|
20
|
+
end
|
21
|
+
|
18
22
|
def secret_uri(server, project_slug, id)
|
19
23
|
path_id = CGI.escape(id)
|
20
24
|
"#{server}/api/cli/v1/projects/#{project_slug}/secrets/#{path_id}"
|
@@ -28,6 +32,10 @@ module ApiRoutes
|
|
28
32
|
"#{server}/api/cli/v1/session"
|
29
33
|
end
|
30
34
|
|
35
|
+
def ci_session_uri(server)
|
36
|
+
"#{server}/api/cli/v1/ci/session"
|
37
|
+
end
|
38
|
+
|
31
39
|
def validate_compose_file_uri(server, project_slug)
|
32
40
|
"#{compose_files_uri(server, project_slug)}/validate"
|
33
41
|
end
|
@@ -54,20 +62,20 @@ module ApiRoutes
|
|
54
62
|
"#{server}/api/cli/v1/projects/#{project_slug}/deployments/#{deployment_id}/events"
|
55
63
|
end
|
56
64
|
|
57
|
-
def check_credential_uri(server, type)
|
58
|
-
"#{server}/api/cli/v1/
|
65
|
+
def check_credential_uri(server, account_id, type)
|
66
|
+
"#{server}/api/cli/v1/accounts/#{account_id}/credentials/#{type}/check_credential"
|
59
67
|
end
|
60
68
|
|
61
|
-
def credentials_uri(server)
|
62
|
-
"#{server}/api/cli/v1/
|
69
|
+
def credentials_uri(server, account_id)
|
70
|
+
"#{server}/api/cli/v1/accounts/#{account_id}/credentials"
|
63
71
|
end
|
64
72
|
|
65
73
|
def preview_services_uri(server, project_slug, deployment_id)
|
66
74
|
"#{server}/api/cli/v1/projects/#{project_slug}/deployments/#{deployment_id}/containers"
|
67
75
|
end
|
68
76
|
|
69
|
-
def credential_uri(server, credential_type)
|
70
|
-
"#{server}/api/cli/v1/
|
77
|
+
def credential_uri(server, account_id, credential_type)
|
78
|
+
"#{server}/api/cli/v1/accounts/#{account_id}/credentials/#{credential_type}"
|
71
79
|
end
|
72
80
|
|
73
81
|
def preview_service_logs_uri(server, project_slug, deployment_id, container_name)
|
@@ -24,6 +24,7 @@ class ProjectService
|
|
24
24
|
Uffizzi.ui.say("Project name: #{project[:name]}")
|
25
25
|
Uffizzi.ui.say("Project slug: #{project[:slug]}")
|
26
26
|
Uffizzi.ui.say("Description: #{project[:description]}".strip)
|
27
|
+
Uffizzi.ui.say("Account name: #{project[:account][:name]}".strip)
|
27
28
|
Uffizzi.ui.say("Created: #{project[:created_at]}")
|
28
29
|
default_compose = project[:default_compose].nil? ? nil : project[:default_compose][:source]
|
29
30
|
Uffizzi.ui.say("Default compose: #{default_compose}".strip)
|
data/lib/uffizzi/version.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
.\" generated with Ronn-NG/v0.9.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
|
3
|
+
.TH "UFFIZZI\-LOGIN\-BY\-IDENTITY\-TOKEN" "" "August 2022" ""
|
4
|
+
.SH "NAME"
|
5
|
+
\fBuffizzi\-login\-by\-identity\-token\fR \- login to Uffizzi using a OIDC token provided by a CI/CD pipeline
|
6
|
+
.SH "SYNOPSIS"
|
7
|
+
.nf
|
8
|
+
uffizzi uffizzi\-login\-by\-identity\-token [UFFIZZI_WIDE_FLAG \|\.\|\.\|\.]
|
9
|
+
.fi
|
10
|
+
.SH "DESCRIPTION"
|
11
|
+
.nf
|
12
|
+
The uffizzi login command lets you authenticate with Uffizzi from a CI/CD pipeline\.
|
13
|
+
If a user/account do not exist, Uffizzi will create them based on token payload\.
|
14
|
+
|
15
|
+
For more information on authentication and credential types, see:
|
16
|
+
https://github\.com/UffizziCloud/uffizzi_cli
|
17
|
+
.fi
|
18
|
+
.SH "UFFIZZI WIDE FLAGS"
|
19
|
+
.nf
|
20
|
+
These flags are available to all commands: \-\-project\. Run $ uffizzi
|
21
|
+
help for details\.
|
22
|
+
.fi
|
23
|
+
.SH "EXAMPLES"
|
24
|
+
.nf
|
25
|
+
To login from the CI/CD pipeline, run:
|
26
|
+
|
27
|
+
$ uffizzi uffizzi\-login\-by\-identity\-token \-\-server=uffizzi\.example\.com \-\-token=[$CI_JOB_TOKEN]
|
28
|
+
.fi
|
29
|
+
|
@@ -0,0 +1,106 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv='content-type' content='text/html;charset=utf8'>
|
5
|
+
<meta name='generator' content='Ronn-NG/v0.9.1 (http://github.com/apjanke/ronn-ng/tree/0.9.1)'>
|
6
|
+
<title>login to Uffizzi using a OIDC token provided by a CI/CD pipeline</title>
|
7
|
+
<style type='text/css' media='all'>
|
8
|
+
/* style: man */
|
9
|
+
body#manpage {margin:0}
|
10
|
+
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
|
11
|
+
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
|
12
|
+
.mp h2 {margin:10px 0 0 0}
|
13
|
+
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
|
14
|
+
.mp h3 {margin:0 0 0 4ex}
|
15
|
+
.mp dt {margin:0;clear:left}
|
16
|
+
.mp dt.flush {float:left;width:8ex}
|
17
|
+
.mp dd {margin:0 0 0 9ex}
|
18
|
+
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
|
19
|
+
.mp pre {margin-bottom:20px}
|
20
|
+
.mp pre+h2,.mp pre+h3 {margin-top:22px}
|
21
|
+
.mp h2+pre,.mp h3+pre {margin-top:5px}
|
22
|
+
.mp img {display:block;margin:auto}
|
23
|
+
.mp h1.man-title {display:none}
|
24
|
+
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
|
25
|
+
.mp h2 {font-size:16px;line-height:1.25}
|
26
|
+
.mp h1 {font-size:20px;line-height:2}
|
27
|
+
.mp {text-align:justify;background:#fff}
|
28
|
+
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
|
29
|
+
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
|
30
|
+
.mp u {text-decoration:underline}
|
31
|
+
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
|
32
|
+
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
|
33
|
+
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
|
34
|
+
.mp b.man-ref {font-weight:normal;color:#434241}
|
35
|
+
.mp pre {padding:0 4ex}
|
36
|
+
.mp pre code {font-weight:normal;color:#434241}
|
37
|
+
.mp h2+pre,h3+pre {padding-left:0}
|
38
|
+
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
|
39
|
+
ol.man-decor {width:100%}
|
40
|
+
ol.man-decor li.tl {text-align:left}
|
41
|
+
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
|
42
|
+
ol.man-decor li.tr {text-align:right;float:right}
|
43
|
+
</style>
|
44
|
+
</head>
|
45
|
+
<!--
|
46
|
+
The following styles are deprecated and will be removed at some point:
|
47
|
+
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
|
48
|
+
|
49
|
+
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
|
50
|
+
.man-navigation should be used instead.
|
51
|
+
-->
|
52
|
+
<body id='manpage'>
|
53
|
+
<div class='mp' id='man'>
|
54
|
+
|
55
|
+
<div class='man-navigation' style='display:none'>
|
56
|
+
<a href="#NAME">NAME</a>
|
57
|
+
<a href="#SYNOPSIS">SYNOPSIS</a>
|
58
|
+
<a href="#DESCRIPTION">DESCRIPTION</a>
|
59
|
+
<a href="#UFFIZZI-WIDE-FLAGS">UFFIZZI WIDE FLAGS</a>
|
60
|
+
<a href="#EXAMPLES">EXAMPLES</a>
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<ol class='man-decor man-head man head'>
|
64
|
+
<li class='tl'>uffizzi-login-by-identity-token</li>
|
65
|
+
<li class='tc'></li>
|
66
|
+
<li class='tr'>uffizzi-login-by-identity-token</li>
|
67
|
+
</ol>
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
<h2 id="NAME">NAME</h2>
|
72
|
+
<p class="man-name">
|
73
|
+
<code>uffizzi-login-by-identity-token</code> - <span class="man-whatis">login to Uffizzi using a OIDC token provided by a CI/CD pipeline</span>
|
74
|
+
</p>
|
75
|
+
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
76
|
+
<pre><code>uffizzi uffizzi-login-by-identity-token [UFFIZZI_WIDE_FLAG ...]
|
77
|
+
</code></pre>
|
78
|
+
|
79
|
+
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
80
|
+
<pre><code>The uffizzi login command lets you authenticate with Uffizzi from a CI/CD pipeline.
|
81
|
+
If a user/account do not exist, Uffizzi will create them based on token payload.
|
82
|
+
|
83
|
+
For more information on authentication and credential types, see:
|
84
|
+
https://github.com/UffizziCloud/uffizzi_cli
|
85
|
+
</code></pre>
|
86
|
+
|
87
|
+
<h2 id="UFFIZZI-WIDE-FLAGS">UFFIZZI WIDE FLAGS</h2>
|
88
|
+
<pre><code>These flags are available to all commands: --project. Run $ uffizzi
|
89
|
+
help for details.
|
90
|
+
</code></pre>
|
91
|
+
|
92
|
+
<h2 id="EXAMPLES">EXAMPLES</h2>
|
93
|
+
<pre><code>To login from the CI/CD pipeline, run:
|
94
|
+
|
95
|
+
$ uffizzi uffizzi-login-by-identity-token --server=uffizzi.example.com --token=[$CI_JOB_TOKEN]
|
96
|
+
</code></pre>
|
97
|
+
|
98
|
+
<ol class='man-decor man-foot man foot'>
|
99
|
+
<li class='tl'></li>
|
100
|
+
<li class='tc'>August 2022</li>
|
101
|
+
<li class='tr'>uffizzi-login-by-identity-token</li>
|
102
|
+
</ol>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
</body>
|
106
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
uffizzi-login-by-identity-token - login to Uffizzi using a OIDC token provided by a CI/CD pipeline
|
2
|
+
================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
uffizzi uffizzi-login-by-identity-token [UFFIZZI_WIDE_FLAG ...]
|
6
|
+
|
7
|
+
## DESCRIPTION
|
8
|
+
The uffizzi login command lets you authenticate with Uffizzi from a CI/CD pipeline.
|
9
|
+
If a user/account do not exist, Uffizzi will create them based on token payload.
|
10
|
+
|
11
|
+
For more information on authentication and credential types, see:
|
12
|
+
https://github.com/UffizziCloud/uffizzi_cli
|
13
|
+
|
14
|
+
## UFFIZZI WIDE FLAGS
|
15
|
+
These flags are available to all commands: --project. Run $ uffizzi
|
16
|
+
help for details.
|
17
|
+
|
18
|
+
## EXAMPLES
|
19
|
+
To login from the CI/CD pipeline, run:
|
20
|
+
|
21
|
+
$ uffizzi uffizzi-login-by-identity-token --server=uffizzi.example.com --token=[$CI_JOB_TOKEN]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uffizzi-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Thurman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-08-
|
12
|
+
date: 2022-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: awesome_print
|
@@ -325,6 +325,7 @@ files:
|
|
325
325
|
- lib/uffizzi/cli/connect.rb
|
326
326
|
- lib/uffizzi/cli/disconnect.rb
|
327
327
|
- lib/uffizzi/cli/login.rb
|
328
|
+
- lib/uffizzi/cli/login_by_identity_token.rb
|
328
329
|
- lib/uffizzi/cli/logout.rb
|
329
330
|
- lib/uffizzi/cli/preview.rb
|
330
331
|
- lib/uffizzi/cli/preview/service.rb
|
@@ -368,6 +369,9 @@ files:
|
|
368
369
|
- man/uffizzi-disconnect
|
369
370
|
- man/uffizzi-disconnect.ronn
|
370
371
|
- man/uffizzi-login
|
372
|
+
- man/uffizzi-login-by-identity-token
|
373
|
+
- man/uffizzi-login-by-identity-token.html
|
374
|
+
- man/uffizzi-login-by-identity-token.ronn
|
371
375
|
- man/uffizzi-login.ronn
|
372
376
|
- man/uffizzi-logout
|
373
377
|
- man/uffizzi-logout.ronn
|