---
resources:
- name: stethoscope
  type: git
  source:
    uri: https://github.com/hsienchiaolee/stethoscope.git

jobs:
- name: unit-test
  public: true
  plan:
  - get: stethoscope
    trigger: true
  - task: bundle-install
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: 10.84.17.162:5000/stethoscope-docker
      inputs:
      - name: stethoscope
      run:
        path: sh
        args:
        - -exc
        - |
          cd stethoscope
          bundle install
  - task: test
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: 10.84.17.162:5000/stethoscope-docker
      inputs:
      - name: stethoscope
      run:
        path: rake
        args:
        - ci

---
resources:
- name: stethoscope
  type: git
  source:
    uri: https://github.com/hsienchiaolee/stethoscope.git

jobs:
- name: unit-test
  public: true
  plan:
  - get: stethoscope
    trigger: true
  - task: bundle-install
    config:
      platform: linux
      image: docker:///hsienchiaolee/docker
      inputs:
      - name: stethoscope
      run:
        path: sh
        args:
        - -exc
        - |
          cd stethoscope
          bundle install
  - task: test
    config:
      platform: linux
      image: docker:///hsienchiaolee/docker
      inputs:
      - name: stethoscope
      run:
        path: sh
        args:
        - -exc
        - |
          cd stethoscope
          mkdir spec/logs
          touch spec/logs/server.out
          touch spec/logs/server.err
          rake ci

Load docker image from docker hub
Load docker image from docker hub
