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

时间:2023-12-06 15:59:13

使用yaml配置Go构建

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
version: 2.0 # 必须是2.0
steps:
  BUILD:
    - go: 
        inputs: 
          command: |
            export GO15VENDOREXPERIMENT=1 
            export GOPROXY=https://goproxy.cn 
            mkdir -p $GOPATH/src/example.com/demo/ 
            cp -rf . $GOPATH/src/example.com/demo/ 
            go install example.com/demo 
            cp -rf $GOPATH/bin/ ./bin

参数名

参数类型

描述

是否必填

默认值

command

string

执行命令。

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