mono构建
使用mono可以完成msbuild和dotnet构建。
在配置构建步骤中,添加“mono”构建步骤,参考表1配置参数。
| 参数 | 说明 |
|---|---|
| 步骤显示名称 | 构建步骤的名称,可自定义修改。
|
| 工具版本 | 根据用户实际开发环境的需要,选择对应的工具版本。 CodeArts Build支持的工具版本,可查看构建工具版本。若当前的工具版本不满足您的使用要求,您可以制作镜像并推送到SWR仓库。 |
| 命令 | 配置mono命令,一般使用界面上系统默认生成的命令即可。如有特殊构建要求,可以在文本域中输入自定义的构建脚本。 |
| 失败后是否继续运行 | 当前步骤执行失败后是否继续执行下一个步骤,根据实际使用场景选择是或否。 |
参考以下代码示例,修改在创建代码化构建使用的YAML文件中的BUILD部分代码信息。
1 2 3 4 5 6 7 8 9 10 11 12 | version: 2.0 # 必须是2.0 steps: BUILD: - mono: inputs: command: | nuget sources Disable -Name 'nuget.org' nuget sources add -Name 'xxcloud' -Source 'https://repo.xxcloud.com/repository/nuget/v3/index.json' nuget restore msbuild /p:OutputPath=../buildResult/Release/bin zip -rq ./archive.zip ./buildResult/Release/bin/* ignore_fail: true |
| 参数 | 类型 | 说明 |
|---|---|---|
| command | string | 配置mono执行命令。 |
| ignore_fail | string | 用于控制当前步骤执行失败后是否继续执行下一个步骤。
|