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

支持通过 GitHub Actions 来构建和发布 Wasm 插件镜像 #1052

Open
CH3CHO opened this issue Jun 22, 2024 · 5 comments · May be fixed by #1063 or #1069
Open

支持通过 GitHub Actions 来构建和发布 Wasm 插件镜像 #1052

CH3CHO opened this issue Jun 22, 2024 · 5 comments · May be fixed by #1063 or #1069

Comments

@CH3CHO
Copy link
Collaborator

CH3CHO commented Jun 22, 2024

Why do you need it?

随着仓库中的 Wasm 插件越来越多,构建发布的工作量也日益增大,我们需要利用 GitHub Actions 来自动完成相应的镜像构建和发布工作。

How could it be?

  1. 目前只需支持使用 Golang 编写的 Wasm 插件。插件的所有代码位于 https://github.com/alibaba/higress/tree/main/plugins/wasm go 目录下。插件的构建流程可参考该目录下的 README.md;
  2. 工作流需支持通过 push tag 和人工触发:
    a. 在通过 push tag 触发时,tag 名称格式为 wasm-go-{pluginName}-vX.Y.Z(例如:wasm-go-basic-auth-v1.0.0),表示为目录名为 {pluginName} 的 wasm-go 插件来构建 tag 为 1.0.0 的镜像;
    b.在人工触发时,要求用户输入待构建的插件名称和版本号(版本号可不考虑前面带 v 的情况)。
  3. 请使用 oras 进行镜像的构建和推送。操作方式请参考 Higress Wasm 插件镜像规范
  4. 插件的镜像仓库应通过 GitHub 的“Actions secrets and variables”进行配置。

Other related information

Higress 组件的镜像已经支持通过 GitHub Actions 进行构建。开发时可以参考相应的工作流脚本:https://github.com/alibaba/higress/blob/main/.github/workflows/build-image-and-push.yaml

@cr7258
Copy link
Collaborator

cr7258 commented Jun 26, 2024

@CH3CHO 认领这个任务

@Beatrueman
Copy link

@CH3CHO 我是一个新手,我也想尝试完成这个任务😊

@Beatrueman
Copy link

@CH3CHO 请问在Wasm 插件镜像规范中镜像元数据文件spec.yaml需要插件制作者自己提供?还是在Github Action中生成?

@cr7258 cr7258 linked a pull request Jun 27, 2024 that will close this issue
@cr7258
Copy link
Collaborator

cr7258 commented Jun 27, 2024

Hello @Beatrueman , 我刚刚提交了 PR, 你也可以帮忙一起 review 一下。

@CH3CHO
Copy link
Collaborator Author

CH3CHO commented Jun 27, 2024

@CH3CHO 请问在Wasm 插件镜像规范中镜像元数据文件spec.yaml需要插件制作者自己提供?还是在Github Action中生成?

现在运行时只有 plugin.wasm 文件是绝对必须的,其他文件都是配置界面对插件元数据的要求,会影响用户的使用体验。就现在来说,其他文件先在插件目录下尝试寻找已有的同名文件。如果没有的话,镜像中可以不用包含这个文件。

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