resource_types:
  - name: rss-resource
    type: docker-image
    source:
      repository: suhlig/concourse-rss-resource
      tag: latest

  - name: slack-notification
    type: docker-image
    source:
      repository: cfcommunity/slack-notification-resource
      tag: latest

resources:
  - name: postgres-release-versions
    type: rss-resource
    source:
      url: https://www.postgresql.org/versions.rss

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

jobs:
  - name: monitor-postgres-releases
    plan:
    - get: postgres-release-versions
      trigger: true

    - put: slack-alert
      params:
        channel: '#random'
        text_file:  postgres-release-versions/description
        text: |
          New Postgres version available: $TEXT_FILE_CONTENT

          See $ATC_EXTERNAL_URL/builds/$BUILD_ID for more details.

resource_types:
  - name: rss-resource
    type: docker-image
    source:
      repository: suhlig/concourse-rss-resource
      tag: latest

  - name: slack-notification
    type: docker-image
    source:
      repository: cfcommunity/slack-notification-resource
      tag: latest

resources:
  - name: postgres-release-versions
    type: rss-resource
    source:
      url: https://www.postgresql.org/versions.rss

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

jobs:
  - name: monitor-postgres-releases
    plan:
    - get: postgres-release-versions
      trigger: true

    - put: slack-alert
      params:
        channel: '#random'
        text_file:  postgres-release-versions/link
        text: |
          New Postgres version available: $TEXT_FILE_CONTENT

          See $ATC_EXTERNAL_URL/builds/$BUILD_ID for more details.

Use link in Slack message
Use link in Slack message
