---
- job:
    name: Run_Whitehall_Data_Migrations
    display-name: Run_Whitehall_Data_Migrations
    project-type: freestyle
    description: "This job SSHes to whitehall-backend-2.backend.<%= @environment -%> and runs 'cd /var/apps/whitehall ; RAILS_ENV=production       bundle exec rake db:data:migrate'"
    builders:
        - shell: |
            ssh deploy@whitehall-backend-2.backend.<%= @environment -%> 'cd /var/apps/whitehall ; govuk_setenv whitehall bundle exec rake db:data:migrate'
    wrappers:
        - ansicolor:
            colormap: xterm

---
- job:
    name: Run_Whitehall_Data_Migrations
    display-name: Run_Whitehall_Data_Migrations
    project-type: freestyle
    description: "This job SSHes to whitehall-backend-2.backend.<%= @app_domain -%> and runs 'cd /var/apps/whitehall ; RAILS_ENV=production       bundle exec rake db:data:migrate'"
    builders:
        - shell: |
            ssh deploy@whitehall-backend-2.backend.<%= @app_domain -%> 'cd /var/apps/whitehall ; govuk_setenv whitehall bundle exec rake db:data:migrate'
    wrappers:
        - ansicolor:
            colormap: xterm

Use app_domain instead of environment variable for Jenkins job ssh
Use app_domain instead of environment variable for Jenkins job ssh

In Carrenza Staging, whitehall-backend-2.backend.staging doesn't resolve.
Using app_domain instead of environment makes the hostname
whitehall-backend-2.backend.staging.publishing.service.gov.uk which
is in /etc/hosts.
