编译构建 CODEARTS BUILD-使用yaml配置Msbuild构建

时间:2023-12-20 17:27:54

使用yaml配置Msbuild构建

version: 2.0 # 必须是2.0
steps:
  BUILD:
    - msbuild:
       inputs: 
          command: |-
            nuget sources Disable -Name 'nuget.org'
            nuget sources Disable -Name 'myget'
            nuget sources Disable -Name 'huawei'
            nuget sources add -Name 'huaweicloud' -Source 'http://mirrors-devcloud.rnd.huawei.com/repository/nuget/v3/index.json'
            nuget restore 
            msbuild /p:OutputPath=../buildResult/Release/bin 
            powershell -Command Compress-Archive -Path ./buildResult/Release/bin/* -DestinationPath ./archive.zip

参数名

参数类型

描述

是否必填

默认值

command

string

执行命令。

support.huaweicloud.com/usermanual-codeci/codeci_ug_1082.html