# Leo任务配置文档

```yaml
job:
  gitLab:
    instance:
      # GitLab实例名称
      name: gitlab.chuanyinet.com
    project:  
      # GitLab项目SSH URL地址
      sshUrl: git@gitlab.chuanyinet.com:basic-service/merchant-rss.git
      # 任务首选分支
      branch: dev
    gitFlow: true
  # 容器注册表
  cr:
    # 容器注册表类型 ACR、ECR
    type: ACR
    cloud:
      # 云实例UUID（优先级高于名称）
      uuid: 75cde081a08646e6b8568b3d34f203a3
      # 云实例名称
      name: 阿里云-PalmPay主账户
    # 容器注册表实例配置
    instance:
       # RegionId 必填
       regionId: eu-west-1
       # 实例id
       id: cri-4v9b8l2gc3en0x34
       # 实例名称
       name: cr-chuanyinet-eu-west-1
       # 实例对应的仓库URL
       url: aliyun-cr-uk.chuanyinet.com
    # 数据不填写会自动生成 id > name > 应用名   
    repo:
       # 仓库id
       id: XXXXXXXX
       # 仓库名称，填写后会自动注入构建参数project
       name: merchant-rss
       # 数据不填写会自动生成
       # 默认为任务环境类型
       namespace: dev
    # instance:
       # regionId: eu-west-1
       # url: 502076313352.dkr.ecr.eu-west-1.amazonaws.com       
  build:
    # 构建类型，可选: kubernetes-image、maven-publish
    type: kubernetes-image
    # 构建版本命名配置
    version:
       # 构建版本前缀
       prefix:
       # 构建版本后缀, 可注入变量${envName}、${buildNumber}、${commitId}
       # applicationName-release-5 
       suffix: release-${commitId}-${buildNumber} 
    # 钉钉通知配置
    notify:
      # 类型目前无效
      type: dingtalk
      # DingtalkRobot数据源实例
      name: robot-leo-test
  deploy:
    notify:
      # 类型目前无效
      type: dingtalk
      # DingtalkRobot数据源实例
      name: robot-leo-test
  sonar:
    enabled: false
  # 任务标签必须和Leo实例匹配
  tags:
    - '@London'
  # 任务参数配置
  parameters: 
    - 
      name: project
      value: merchant-rss
    - 
      name: buildCmd
      value: /opt/tools/maven/bin/mvn
    -
      name: dockerfile
      value: Dockerfile-test
    - 
      name: build
      value: clean package -e -U -T 2C -DskipTests -Dmaven.compile.fork=true
    - 
      name: artifactPath
      value: 'merchant-rss-start/target'
    - 
      name: registryUrl
      value: 'aliyun-cr-uk.chuanyinet.com'
```