---
- scm:
    name: dfid-transition-import
    scm:
        - git:
            url: git@github.com:alphagov/dfid-transition.git
            branches:
              - master

- job:
    name: dfid-transition-import
    display-name: DFID Transition Import
    project-type: freestyle
    description: "This job loads research outputs for the DFID specialist finder"
    scm:
      - dfid-transition-import
    logrotate:
        artifactNumToKeep: 100
    triggers:
        - timed: '49 * * * *' # every hour on the 49th minute
    builders:
        - shell: |
            bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
            bundle exec rake load:outputs
    wrappers:
        - ansicolor:
            colormap: xterm
        - inject:
            properties-content: REDIS_HOST=<%= @redis_host %>
            properties-content: REDIS_PORT=<%= @redis_port %>
        - inject-passwords:
            global: false
            mask-password-params: true
            job-passwords:
              - name: PUBLISHING_API_BEARER_TOKEN
                password:
                  '<%= @publishing_api_bearer_token %>'
              - name: ASSET_MANAGER_BEARER_TOKEN
                password:
                  '<%= @asset_manager_bearer_token %>'

---
- scm:
    name: dfid-transition-import
    scm:
        - git:
            url: git@github.com:alphagov/dfid-transition.git
            branches:
              - master

- job:
    name: dfid-transition-import
    display-name: DFID Transition Import
    project-type: freestyle
    description: "This job loads research outputs for the DFID specialist finder"
    scm:
      - dfid-transition-import
    logrotate:
        artifactNumToKeep: 100
    triggers:
        - timed: '49 * * * *' # every hour on the 49th minute
    builders:
        - shell: |
            bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
            bundle exec rake load:outputs
    properties:
        - inject:
            properties-content: REDIS_HOST=<%= @redis_host %>
            properties-content: REDIS_PORT=<%= @redis_port %>
    wrappers:
        - ansicolor:
            colormap: xterm
        - inject-passwords:
            global: false
            mask-password-params: true
            job-passwords:
              - name: PUBLISHING_API_BEARER_TOKEN
                password:
                  '<%= @publishing_api_bearer_token %>'
              - name: ASSET_MANAGER_BEARER_TOKEN
                password:
                  '<%= @asset_manager_bearer_token %>'

Move wrapper inject into job properties
Move wrapper inject into job properties

Wasn't working in previous documented position, follow prior art from
.pp's in same dir
