kubesphere / ksbuilder

A CLI tool helps you to manage the development of kubesphere extensions
MIT License
10 stars 19 forks source link

Integrate with KubeSphere Cloud #91

Closed iawia002 closed 4 months ago

iawia002 commented 4 months ago

ref https://github.com/kubesphere/issues/issues/1684

增加两个子命令用于上传扩展组件到 ks cloud:

login       Login to KubeSphere Cloud
logout      Log out from KubeSphere Cloud
push        Push and submit extensions to KubeSphere Cloud for review

登录需要提前创建 API access token https://github.com/kubesphere/project/issues/1931

$ ksbuilder login -t xxx

Login Succeeded
$ ksbuilder login
✔ Enter API token: ***

Login Succeeded

push 子命令类似于 publish,可以是一个目录,也可以是打包好的 .tgz 文件:

$ ksbuilder push tower

$ ksbuilder push tower-1.0.0.tgz

loginpush 调用 API 遇到任何报错都会展示 cloud 返回的错误,比如:

$ ksbuilder login -t aa

error executing command: login failed: 403 Forbidden, permission denied

/cc @wansir @stoneshi-yunify