---
- job:
    name: remove-emergency-banner
    display-name: Remove the emergency banner
    project-type: freestyle
    description: >
      Remove the emergency banner from GOV.UK.
    properties:
      - build-discarder:
          num-to-keep: 30
    builders:
      # The argument to `-c` is in this case `frontend` but the value is used by both `static` and `frontend` applications
      - shell: ssh deploy@$(govuk_node_list -c frontend --single-node) "cd /var/apps/static && govuk_setenv static bundle exec rake emergency_banner:remove"
      - trigger-builds:
          - project: clear-template-cache
            block: true
          - project: clear-frontend-memcache
            block: true
          - project: clear-varnish-cache
            block: true
      <%- if @clear_cdn_cache -%>
          - project: clear-cdn-cache
            block: true
      <%- end -%>
    wrappers:
      - ansicolor:
          colormap: xterm

---
- job:
    name: remove-emergency-banner
    display-name: Remove the emergency banner
    project-type: freestyle
    description: >
      Remove the emergency banner from GOV.UK.
    properties:
      - build-discarder:
          num-to-keep: 30
    builders:
      - trigger-builds:
          - project: run-rake-task
            block: true
            predefined-parameters: |
              TARGET_APPLICATION=static
              MACHINE_CLASS=frontend
              RAKE_TASK=emergency_banner:remove
          - project: clear-template-cache
            block: true
          - project: clear-frontend-memcache
            block: true
          - project: clear-varnish-cache
            block: true
      <%- if @clear_cdn_cache -%>
          - project: clear-cdn-cache
            block: true
      <%- end -%>
    wrappers:
      - ansicolor:
          colormap: xterm

Use run-rake-task in remove-emergency-banner job
Use run-rake-task in remove-emergency-banner job
