---
- job:
    name: whitehall_run_broken_link_checker
    display-name: whitehall_run_broken_link_checker
    project-type: freestyle
    description: "<p>Triggers the broken link checker rake task on whitehall-backend-1.</p>"
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - trigger-builds:
          - project: run-rake-task
            block: true
            predefined-parameters: |
              TARGET_APPLICATION=whitehall
              MACHINE_CLASS=whitehall_backend
              RAKE_TASK='generate_broken_link_reports[/tmp/bad_link_reports,second-line-content@digital.cabinet-office.gov.uk]'
    triggers:
        - timed: |
            TZ=Europe/London
            0 2 1 * *
    wrappers:
        - ansicolor:
            colormap: xterm
    publishers:
        - trigger-parameterized-builds:
            - project: success_passive_check
              condition: 'SUCCESS'
              predefined-parameters: |
                  NSCA_CHECK_DESCRIPTION=<%= @service_description %>
                  NSCA_OUTPUT=<%= @service_description %> successful
            - project: failure_passive_check
              condition: 'FAILED'
              predefined-parameters: |
                  NSCA_CHECK_DESCRIPTION=<%= @service_description %>
                  NSCA_OUTPUT=<%= @service_description %> failed
    logrotate:
        numToKeep: 10

---
- job:
    name: whitehall_run_broken_link_checker
    display-name: whitehall_run_broken_link_checker
    project-type: freestyle
    description: "<p>Triggers the broken link checker rake task on whitehall-backend-1.</p>"
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - trigger-builds:
          - project: run-rake-task
            block: true
            predefined-parameters: |
              TARGET_APPLICATION=whitehall
              MACHINE_CLASS=whitehall_backend
              RAKE_TASK='generate_broken_link_reports[/tmp/bad_link_reports,save-x7QZmKs2eDkK@3.basecamp.com]'
    triggers:
        - timed: |
            TZ=Europe/London
            0 2 1 * *
    wrappers:
        - ansicolor:
            colormap: xterm
    publishers:
        - trigger-parameterized-builds:
            - project: success_passive_check
              condition: 'SUCCESS'
              predefined-parameters: |
                  NSCA_CHECK_DESCRIPTION=<%= @service_description %>
                  NSCA_OUTPUT=<%= @service_description %> successful
            - project: failure_passive_check
              condition: 'FAILED'
              predefined-parameters: |
                  NSCA_CHECK_DESCRIPTION=<%= @service_description %>
                  NSCA_OUTPUT=<%= @service_description %> failed
    logrotate:
        numToKeep: 10

Update destination address for broken link reports
Update destination address for broken link reports

Sending direct to basecampe to avoid an unnecessary manual step by content support.
