---
- job:
    name: Publishing_API_Archive_Events
    display-name: Publishing_API_Archive_Events
    project-type: freestyle
    description: "This job periodically archives publishing API events to S3"
    builders:
      - shell: ssh deploy@$(govuk_node_list -c publishing_api --single-node) "cd /var/apps/publishing-api && govuk_setenv publishing-api bundle exec rake events:export_to_s3"
    logrotate:
      numToKeep: 10
    triggers:
        - timed: 'H 5 * * 0'

---
- job:
    name: Publishing_API_Archive_Events
    display-name: Publishing_API_Archive_Events
    project-type: freestyle
    description: "This job periodically archives publishing API events to S3"
    builders:
      - shell: ssh deploy@$(govuk_node_list -c publishing_api --single-node) "cd /var/apps/publishing-api && govuk_setenv publishing-api bundle exec rake events:export_to_s3"
    logrotate:
      numToKeep: 10
    triggers:
        - timed: 'H 5 * * 0'
    publishers:
        - email:
            recipients: 2nd-line-support@digital.cabinet-office.gov.uk
            send-to-individuals: true

Add email notifications if publishing-api task fails
Add email notifications if publishing-api task fails

This job has been broken for a while now. This setting *should* email
2nd line that something is wrong for each failure. But I haven't tested
this.
