---
resources:
- name: garagepi
  type: git
  source:
    uri: git@github.com:robdimsdale/garagepi
    branch: develop
    private_key: {{private-key}}

- name: slack_alert
  type: slack-notification
  source:
    url: {{slack-url}}

- name: version
  type: semver
  source:
    initial_version: 0.1.0
    bucket: garagepi-releases
    key: current-version
    access_key_id: {{pipeline-bucket-access-key}}
    secret_access_key: {{pipeline-bucket-secret-key}}

jobs:
- name: tests
  public: false
  plan:
  - do:
    - aggregate:
      - get: version
        params: {bump: minor}
      - get: garagepi
        trigger: true
    - task: tests
      file: garagepi/scripts/ci/tests.yml
    - put: version
      params: {file: version/number}
    on_success:
      put: slack_alert
      params:
        username: concourse
        icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
        channel: {{slack-channel}}
        text: {{slack-success-text}}
    on_failure:
      put: slack_alert
      params:
        username: concourse
        icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
        channel: {{slack-channel}}
        text: {{slack-failure-text}}

---
resources:
- name: garagepi
  type: git
  source:
    uri: git@github.com:robdimsdale/garagepi
    branch: develop
    private_key: {{private-key}}

- name: slack-alert
  type: slack-notification
  source:
    url: {{slack-url}}

- name: version
  type: semver
  source:
    initial_version: 0.1.0
    bucket: garagepi-releases
    key: current-version
    access_key_id: {{pipeline-bucket-access-key}}
    secret_access_key: {{pipeline-bucket-secret-key}}

jobs:
- name: tests
  public: false
  plan:
  - do:
    - aggregate:
      - get: version
        params: {bump: minor}
      - get: garagepi
        trigger: true
    - task: tests
      file: garagepi/scripts/ci/tests.yml
    - put: version
      params: {file: version/number}
    on_success:
      put: slack-alert
      params:
        username: concourse
        icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
        channel: {{slack-channel}}
        text: {{slack-success-text}}
    on_failure:
      put: slack-alert
      params:
        username: concourse
        icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
        channel: {{slack-channel}}
        text: {{slack-failure-text}}

Rename slack_alert resource to slack-alert
Rename slack_alert resource to slack-alert
