Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

远程编译提供命令行连接参数 #5001

Open
offscum opened this issue Apr 23, 2024 · 3 comments
Open

远程编译提供命令行连接参数 #5001

offscum opened this issue Apr 23, 2024 · 3 comments

Comments

@offscum
Copy link

offscum commented Apr 23, 2024

Is your feature request related to a problem? Please describe.

查阅官方文档发现只支持根据~/.xmake/service/client.conf配置文件进行连接,这样在ci/cd情况下比较繁琐。

  1. 提供命令行参数直接进行连接
  2. 提供命令行参数进行配置信息

Describe the solution you'd like

  1. xmake service --connect --remote_build_endpoint=xxx --remote_build_token=xxxx
    xmake service --connect --remote_build_endpoint=xxx --remote_build_username=xxx --remote_build_password=xxx
  2. xmake service --config --remote_build_endpoint=xxx --remote_build_token=xxxx
    xmake service --config --remote_build_endpoint=xxx --remote_build_username=xxx --remote_build_password=xxx
    xmake service --connect

Describe alternatives you've considered

No response

Additional context

No response

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: Remote compilation provides command line connection parameters

Is your feature request related to a problem? Please describe.

After consulting the official documentation, I found that only connection based on the ~/.xmake/service/client.conf configuration file is supported, which is more cumbersome in ci/cd situations.

  1. Provide command line parameters to connect directly
  2. Provide command line parameters for configuration information

Describe the solution you'd like

  1. xmake service --connect --remote_build_endpoint=xxx --remote_build_token=xxxx
    xmake service --connect --remote_build_endpoint=xxx --remote_build_username=xxx --remote_build_password=xxx
  2. xmake service --config --remote_build_endpoint=xxx --remote_build_token=xxxx
    xmake service --config --remote_build_endpoint=xxx --remote_build_username=xxx --remote_build_password=xxx
    xmake service --connect

Describe alternatives you've considered

No response

Additional context

No response

@waruqi
Copy link
Member

waruqi commented Apr 24, 2024

自己写个 config.lua 脚本改改 也没几行代码的事情。。暂时不考虑,参数太多了,不同 service 的 connect/token 还不一样,还得区分。。之后可能还有其他配置,不可能一股脑全 arguments 上配。

config.lua

function main(conn, token)
    local file = "~/.xmake/service/client.conf"
    local config = io.load(file)
    config.remote_build.connect = conn
    config.remote_build.token = token
    io.save(file, config)
end
xmake l config.lua "127.0.0.1" "xxxxxxxx"
xmake service --connect

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


It only takes a few lines of code to write a config.lua script and modify it. . Ignore it for now, there are too many parameters, and the connect/token of different services are different and need to be distinguished. . There may be other configurations later, and it is impossible to configure all arguments in one go.

config.lua

function main(conn, token)
    local config = io.load("~/.xmake/service/client.conf")
    config.remote_build.connect = conn
    config.remote_build.token = token
end
xmake l config.lua "127.0.0.1" "xxxxxxxx"
xmake service --connect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants