platform: 10.11.92.33
clone:
  git:
    image: registry.cn-qingdao.aliyuncs.com/wod-devops/git:1.4.0
    pull: true
    dns: 223.5.5.5
pipeline:
  read-cache:
    image: registry.cn-qingdao.aliyuncs.com/wod-devops/cache:latest
    restore: true
    mount:
      - ./node_modules
    volumes:
      - /data/cache:/cache
  build:
    image: registry.cn-qingdao.aliyuncs.com/wod-devops/node:8.15.0-onbuild
    dns: 223.5.5.5
    volumes:
      - /data/cache/yarn:/usr/local/share/.cache/yarn/v1    
    commands:
      - yarn install
      - yarn run build
  store-cache:
    image: registry.cn-qingdao.aliyuncs.com/wod-devops/cache:latest
    rebuild: true
    mount:
      - ./node_modules 
    volumes:
      - /data/cache:/cache
  docker-dev:
    image: registry.cn-qingdao.aliyuncs.com/wod-devops/docker:1.0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock    
    base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0.0
    repo: apaas/apaas-v3-ui
    version: 1.0.0
    channel: alpha
    registry: hub.wodcloud.com
    when:
      branch: dev
  docker-master:
    image: registry.cn-qingdao.aliyuncs.com/wod-devops/docker:1.0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock    
    base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0.0
    repo: apaas/apaas-v3-ui
    version: 1.0.0
    registry: hub.wodcloud.com
    when:
      branch: master  
  deploy:
    image: registry.cn-qingdao.aliyuncs.com/wod-devops/kubernetes:1.0
    namespace: apaas-v3
    deployment: apaas-v3-ui
    container: apaas-v3-ui
    registry: hub.wodcloud.com

branches: [master,dev]
