RadxaOS-SDK/rsdk

添加CI/CD脚本

Closed this issue · 4 comments

  • 添加ci/build-image目录作为radxa-build里面仓库的模板
    • #4
    • #5
    • 可以把对应的仓库先clone到ci/.build-image-work-dir/里面,然后git rm *删掉所有内容,再把生成的模板复制进来
    • 如果git status变成dirty则可以commit
  • 添加bin/sub/rsdk-infra-rebuild命令,将radxa-build仓库统一按照模板进行更新
    • 可以参考bin/sub/rsdk-build命令来处理命令行输入
    • radxa-build需要作为--build-org的默认参数,已方便用户后续自行替换
    • --build-org对应而github组织不存在时需要提示创建
    • 使用gh作为github客户端
    • 默认在没有对应组织的情况下失败返回,但加一个--create-missing-org开关来允许新建组织
    • 按照configs/products.json查询对应产品的仓库,默认在没有找到仓库的情况下会直接跳过,加一个--create-missing-product-repo开关来允许在没有找到的情况下新建仓库
    • rsdk rebuild-infra默认检查configs/products.json里面所有的仓库,但可以使用rsdk rebuild-infra --product xxx来只检查某一个产品的仓库。主要用于调试和客户自己维护个别定制产品之用

rsdk目前能构建出镜像吗,我进入开发容器后试了一下:

vscode ➜ /workspaces/rsdk (main) $ rsdk build
/workspaces/rsdk/bin/sub/rsdk-build: line 62: 1: unbound variable
vscode ➜ /workspaces/rsdk (main) $ 

rsdk目前能构建出镜像吗,我进入开发容器后试了一下:

vscode ➜ /workspaces/rsdk (main) $ rsdk build
/workspaces/rsdk/bin/sub/rsdk-build: line 62: 1: unbound variable
vscode ➜ /workspaces/rsdk (main) $ 
vscode ➜ /workspaces/rsdk (main) $ rsdk build zero2pro bullseye cli
APT keyrings are ready.
RUNTIME ERROR: Index 0 out of bounds, not within [0, 0)
        /workspaces/rsdk/templates/lib/product_soc.libjsonnet:(4:5)-(5:32)
        /workspaces/rsdk/templates/mod/additional_repos.libjsonnet:3:48-68      thunk from <function <product_soc_family>>
        /workspaces/rsdk/templates/lib/soc_family.libjsonnet:4:51-54
        /workspaces/rsdk/templates/lib/soc_family.libjsonnet:4:28-55
        /workspaces/rsdk/templates/lib/soc_family.libjsonnet:(4:5)-(5:25)
        /workspaces/rsdk/templates/mod/additional_repos.libjsonnet:3:37-69      function <product_soc_family>
        /workspaces/rsdk/templates/mod/additional_repos.libjsonnet:41:41-68     object <anonymous>
        <std>:773:15-21 thunk <val> from <function <format_codes_obj>>
        <std>:780:27-30 thunk from <thunk <s> from <function <format_codes_obj>>>
        <std>:604:22-25 thunk from <function <format_code>>
        ...
        <std>:785:15-35 thunk <s_padded> from <function <format_codes_obj>>
        <std>:786:51-59 thunk from <function <format_codes_obj>>
        <std>:786:11-60 function <format_codes_obj>
        <std>:791:7-43  function <anonymous>
        <std>:249:7-23  function <anonymous>
        /workspaces/rsdk/templates/mod/additional_repos.libjsonnet:(37:13)-(42:18)
        Array element 5
        Field "setup-hooks"
        Field "mmdebstrap"
        During manifestation

issue中提出的rsdk-infra-rebuild现在算是有替代物了