---
- job:
    name: Validate_published_dns
    display-name: Validate_published_dns
    project-type: freestyle
    description: "<p>Check that the published DNS records match those in the <a href='https://github.gds/govuk-dns-config'>govuk-dns-config repo</a> YAML file.</p>"
    logrotate:
        numToKeep: 30
    builders:
        - shell: |
            set -e
            rm -rf govuk-dns-config
            git clone --branch master --depth 1 git@github.gds:gds/govuk-dns-config.git
            cd govuk-dns-config
            bundle install
            bundle exec rake validate_dns
    wrappers:
        - ansicolor:
            colormap: xterm
    publishers:
        - email:
            recipients: 2nd-line-support@digital.cabinet-office.gov.uk
    triggers:
        - timed: '@midnight'

---
- job:
    name: Validate_published_dns
    display-name: Validate_published_dns
    project-type: freestyle
    description: "<p>Check that the published DNS records match those in the <a href='https://github.gds/govuk-dns-config'>govuk-dns-config repo</a> YAML file.</p>"
    logrotate:
        numToKeep: 30
    builders:
        - shell: |
            set -e
            rm -rf govuk-dns-config
            git clone --branch master --depth 1 git@github.gds:gds/govuk-dns-config.git
            cd govuk-dns-config
            bundle install --path "${HOME}/bundles/${JOB_NAME}"
            bundle exec rake validate_dns
    wrappers:
        - ansicolor:
            colormap: xterm
    publishers:
        - email:
            recipients: 2nd-line-support@digital.cabinet-office.gov.uk
    triggers:
        - timed: '@midnight'

Add path to bundle install for publish DNS job
Add path to bundle install for publish DNS job

The `bundle install` step of the job has been failing with errors like:
```bash
Bundler::GemspecError: Could not read gem at /usr/lib/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/cache/rake-12.0.0.gem. It may be corrupted.
sudo: no tty present and no askpass program specified
```

Upon inspection all other `bundle install` steps use the `--path`
option to install the gems locally. We'll do that here to hopefully
fix the problem.
