
clone:
  git:
    image: registry.cn-qingdao.aliyuncs.com/wod/devops-git-arm64:1.0
pipeline:
  read-cache:
    image: registry.cn-qingdao.aliyuncs.com/wod/devops-cache-arm64:1.0
    restore: true
    check: yarn.lock
    mount:
      - ./node_modules
      - ./yarn.lock
    volumes:
      - /data/cache:/cache
  build:
    image: registry.cn-qingdao.aliyuncs.com/wod/devops-node-arm64:12.18.2-buster
    volumes:
      - /data/cache/yarn:/usr/local/share/.cache/yarn
    commands:
      - yarn install
      - yarn run build
  store-cache:
    image: registry.cn-qingdao.aliyuncs.com/wod/devops-cache-arm64:1.0
    rebuild: true
    mount:
      - ./node_modules
      - ./yarn.lock
    volumes:
      - /data/cache:/cache
  docker:
    image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock    
    base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base-arm64:2.0
    repo: wod/apaas-ui-arm64
    version: "v3.0.0"
    channel: alpha
    registry: registry.cn-qingdao.aliyuncs.com
    secrets:
      - source: REGISTRY_USER_ALIYUN
        target: REGISTRY_USER
      - source: REGISTRY_PASSWORD_ALIYUN
        target: REGISTRY_PASSWORD
    when:
      branch: dev
  harbor:
    image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock    
    base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base-arm64:2.0
    repo: wod/apaas-ui-arm64
    version: "v3.0.0"
    registry: registry.cn-qingdao.aliyuncs.com
    secrets:
      - source: REGISTRY_USER_ALIYUN
        target: REGISTRY_USER
      - source: REGISTRY_PASSWORD_ALIYUN
        target: REGISTRY_PASSWORD
    when:
      branch: master
  latest:
    image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock    
    base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base-arm64:2.0
    repo: wod/apaas-ui-arm64
    version: "v3.0"
    registry: registry.cn-qingdao.aliyuncs.com
    secrets:
      - source: REGISTRY_USER_ALIYUN
        target: REGISTRY_USER
      - source: REGISTRY_PASSWORD_ALIYUN
        target: REGISTRY_PASSWORD
    when:
      branch: master

branches: [master,dev]
