---
- job:
    name: search_index_checks
    display-name: Search index checks
    project-type: freestyle
    description: |
      This job monitors the GOV.UK search indexes and sends data to statsd.
    logrotate:
      numToKeep: 10
    triggers:
        - timed: 'H/10 * * * *'
    properties:
        - build-discarder:
            days-to-keep: 30
            artifact-num-to-keep: 5
    builders:
        - shell: ssh deploy@$(govuk_node_list -c search --single-node) "cd /var/apps/rummager && govuk_setenv rummager bundle exec rake rummager:monitor_indices"
    wrappers:
      - ansicolor:
          colormap: xterm
      - timestamps

---
- job:
    name: search_index_checks
    display-name: Search index checks
    project-type: freestyle
    description: |
      This job monitors the GOV.UK search indexes and sends data to statsd.
    logrotate:
      numToKeep: 10
    triggers:
        - timed: 'H/10 * * * *'
    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=rummager
              MACHINE_CLASS=search
              RAKE_TASK=rummager:monitor_indices
    wrappers:
      - ansicolor:
          colormap: xterm
      - timestamps

Use run-rake-task in search_index_checks job
Use run-rake-task in search_index_checks job
