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
    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/nginx:1.15.9-alpine
    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/nginx:1.15.9-alpine
    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]
