cicd - 使用 Codemagic 是否可以拥有多个 codemagic.yaml 文件?

标签 cicd codemagic

我正在为我的 Flutter CI 使用 Codemagic。对于我的存储库,我使用单一存储库结构。所以我将我的存储库分成了 +20 个本地包。对于每个包,我都运行自己的工作流程(分析、测试、格式化等)。

由于包数量较多,变成codemagic.yaml文件很大,可读性下降。

借助 GitHub Actions,我可以将工作流程拆分为多个文件,这大大提高了可读性(每个包一个文件)。

最佳答案

我询问了 Codemagic 团队,得到了这样的答案:

Unfortunately we do not plan on introducing the feature to split configurations into multiple different files at this point.

[But] there’s a couple of things you could look at doing. Firstly, take a look into using YAML anchors and aliases so you don’t repeat scripts. Here’s a guide and a sample codemagic.yaml. The other option is to use the Codemagic REST API to trigger your builds and pass app specific environment variables for the build. In this was you can has a single workflow which you pass the variables too. See more about the API here. There’s a few script samples here that show how to call it, and this yaml shows where the environment variables are overwritten.

来源:https://codemagicio.slack.com/archives/CEKE2KZ37/p1645538193515549?thread_ts=1645537597.216489&cid=CEKE2KZ37

关于cicd - 使用 Codemagic 是否可以拥有多个 codemagic.yaml 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71222399/

相关文章:

azure-devops - 有没有办法在 Liquibase 数据库版本控制中包含带有更改日志的整个文件夹?

git - 如何在 gitlab CI 中对 merge 请求应用 if else 条件?

gitlab - 如何为gitlab组中的所有项目设置一个gitlab代理,将项目单独部署到kuberenetes集群

flutter - Codemagic:如何设置集成测试 Android 模拟器

flutter - 如何从 Codemagic 更改最小部署 iosTarget?

powershell - DotNet NuGet 推送导致 PowerShell 出现 TLS 错误

linux - 在相同的 Linux Cent OS 虚拟机上运行两个不同的 Jenkins 版本

ios - App Store Connect 响应代码为 -22020(无法验证您的应用程序。我们无法创建身份验证 session 。)

git - CI/CD 失败,因为缺少构建所需的文件,但在 .gitignore 中的公共(public)存储库中不需要