<commit_before>---
- job:
    name: Data_Sync_Complete
    display-name: Data_Sync_Complete
    project-type: freestyle
    description: "Run after data is synced from production."
    <%- if @auth_token -%>
    auth-token: <%= @auth_token %>
    <%- end -%>
    logrotate:
      artifactNumToKeep: 10
    builders:
       - shell: |
           <%- if @signon_domains_to_migrate -%>
           # Fix signon application hostnames
           <%- @signon_domains_to_migrate.each do |domain| -%>
           ssh deploy@$(govuk_node_list -c backend --single-node) 'cd /var/apps/signon && OLD_DOMAIN=<%= domain['old'] -%> NEW_DOMAIN=<%= domain['new'] -%> govuk_setenv signon bundle exec rake applications:migrate_domain'
           <%- end -%>
           <%- end -%>
           # Queue up any whitehall scheduled editions that have been transferred across.
           ssh deploy@$(govuk_node_list -c whitehall_backend --single-node) 'cd /var/apps/whitehall ; govuk_setenv whitehall bundle exec rake publishing:scheduled:requeue_all_jobs'
           # Queue up any publisher scheduled editions that have been transferred across.
           ssh deploy@$(govuk_node_list -c backend --single-node) 'cd /var/apps/publisher ; govuk_setenv publisher bundle exec rake editions:requeue_scheduled_for_publishing'
    publishers:
        - email:
            recipients: <EMAIL><commit_msg>Migrate Tariff domain in staging<commit_after>---
- job:
    name: Data_Sync_Complete
    display-name: Data_Sync_Complete
    project-type: freestyle
    description: "Run after data is synced from production."
    <%- if @auth_token -%>
    auth-token: <%= @auth_token %>
    <%- end -%>
    logrotate:
      artifactNumToKeep: 10
    builders:
       - shell: |
           <%- if @signon_domains_to_migrate -%>
           # Fix signon application hostnames
           <%- @signon_domains_to_migrate.each do |domain| -%>
           ssh deploy@$(govuk_node_list -c backend --single-node) 'cd /var/apps/signon && OLD_DOMAIN=<%= domain['old'] -%> NEW_DOMAIN=<%= domain['new'] -%> govuk_setenv signon bundle exec rake applications:migrate_domain'
           <%- end -%>
           <%- end -%>
           # Queue up any whitehall scheduled editions that have been transferred across.
           ssh deploy@$(govuk_node_list -c whitehall_backend --single-node) 'cd /var/apps/whitehall ; govuk_setenv whitehall bundle exec rake publishing:scheduled:requeue_all_jobs'
           # Queue up any publisher scheduled editions that have been transferred across.
           ssh deploy@$(govuk_node_list -c backend --single-node) 'cd /var/apps/publisher ; govuk_setenv publisher bundle exec rake editions:requeue_scheduled_for_publishing'
    publishers:
        - trigger-parameterized-builds:
            - project: run-rake-task
              predefined-parameters: |
                TARGET_APPLICATION=router-api
                MACHINE_CLASS=router_backend
                RAKE_TASK=backend:modify_url[tariff,https://tariff-frontend-staging.cloudapps.digital/]
        - email:
            recipients: <EMAIL>
{'fraction_non_alphanumeric': 0.10832791151594014, 'fraction_numerical': 0.0013012361743656475, 'mean_word_length': 2.6782296650717705, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4742158', 'n_tokens_mistral': 982, 'n_tokens_neox': 933, 'n_words': 222}