<commit_before>---
groups:
- name: create
  jobs:
  - setup-infrastructure
  - deploy-cf
- name: delete
  jobs:
  - delete-cf
  - delete-infrastructure

resources:
- name: cf-deployment-concourse-tasks
  type: git
  source:
    uri: https://github.com/cloudfoundry/cf-deployment-concourse-tasks
    branch: master
- name: cli-ci
  type: git
  source:
    uri: https://github.com/cloudfoundry/cli
    branch: master
    path: ci
- name: cf-deployment
  type: git
  source:
    uri: https://github.com/cloudfoundry/cf-deployment
    branch: master
- name: ops-files
  type: git
  source:
    uri: https://github.com/cloudfoundry/cf-deployment
    branch: master
- name: state
  type: git
  source:
    uri: <EMAIL>:cloudfoundry/cli-private
    private_key: {{cli-private-github-private-key-write}}
    branch: master
    paths:
    - ci/infrastructure/hardknox/bbl-state.json
- name: cf-state
  type: git
  source:
    uri: <EMAIL>:cloudfoundry/cli-private
    private_key: {{cli-private-github-private-key-write}}
    branch: master
    paths:
    - ci/infrastructure/hardknox/deployment-vars.yml

jobs:
- name: setup-infrastructure
  serial_groups: [hardknox]
  build_logs_to_retain: 100
  plan:
  - aggregate:
    - get: cf-deployment-concourse-tasks
    - get: state
    - get: cli-ci
  - task: generate-credentials
    file: cli-ci/ci/infrastructure/tasks/param-to-file.yml
    input_mapping:
      input: state
    params:
      FILE_CONTENTS: {{google_account_creds}}
      OUTPUT_PATH: ci/infrastructure/hardknox/google_account_creds.json
  - task: setup-infrastructure
    file: cf-deployment-concourse-tasks/bbl-up/task.yml
    input_mapping:
      bbl-state: param_to_file_output
    params:
      BBL_IAAS: gcp
      BBL_GCP_SERVICE_ACCOUNT_KEY: google_account_creds.json
      BBL_GCP_PROJECT_ID: {{gcp_project}}
      BBL_GCP_REGION: us-central1
      BBL_GCP_ZONE: us-central1-f
      BBL_LB_CERT: {{hardknox_cf_ssl_cert}}
      BBL_LB_KEY: {{hardknox_cf_ssl_cert_private_key}}
      LB_DOMAIN: hardknox.cli.ci.cf-app.com
      BBL_ENV_NAME: hardknox
      BBL_STATE_DIR: ci/infrastructure/hardknox
    ensure:
      put: state
      params:
        repository: updated-bbl-state
        rebase: true

- name: deploy-cf
  serial_groups: [hardknox]
  build_logs_to_retain: 100
  plan:
  - aggregate:
    - get: cf-deployment-concourse-tasks
    - get: state
      passed: [setup-infrastructure]
      trigger: true
    - get: cf-state
    - get: cf-deployment
    - get: ops-files
    - get: cli-ci
  - task: upload-stemcell
    file: cf-deployment-concourse-tasks/bosh-upload-stemcell-from-cf-deployment/task.yml
    input_mapping:
      bbl-state: state
    params:
      INFRASTRUCTURE: google
      BBL_STATE_DIR: ci/infrastructure/hardknox
  - task: copy-ops-files
    file: cli-ci/ci/infrastructure/tasks/combine-inputs.yml
    input_mapping:
      input1: ops-files
      input2: cli-ci
    params:
      COPY_PATHS: "input1/operations/scale-to-one-az.yml input1/operations/tcp-routing-gcp.yml input1/operations/test/add-persistent-isolation-segment-diego-cell.yml input2/ci/infrastructure/operations/app-memory-override.yml input2/ci/infrastructure/operations/cli-isolation-cell-overrides.yml input2/ci/infrastructure/operations/skip-ssl-override.yml"
  - task: deploy-cf
    file: cf-deployment-concourse-tasks/bosh-deploy/task.yml
    input_mapping:
      bbl-state: state
      vars-store: cf-state
      ops-files: combine_inputs_output
    params:
      SYSTEM_DOMAIN: hardknox.cli.ci.cf-app.com
      OPS_FILES: "tcp-routing-gcp.yml cli-isolation-cell-overrides.yml add-persistent-isolation-segment-diego-cell.yml app-memory-override.yml skip-ssl-override.yml scale-to-one-az.yml"
      VARS_STORE_FILE: ci/infrastructure/hardknox/deployment-vars.yml
      BBL_STATE_DIR: ci/infrastructure/hardknox
    ensure:
      put: cf-state
      params:
        repository: updated-vars-store
        rebase: true

- name: delete-cf
  serial_groups: [hardknox]
  build_logs_to_retain: 100
  plan:
  - aggregate:
    - get: cf-deployment-concourse-tasks
    - get: state
  - task: delete-cf-deployment
    file: cf-deployment-concourse-tasks/bosh-delete-deployment/task.yml
    input_mapping:
      bbl-state: state
    params:
      BBL_STATE_DIR: ci/infrastructure/hardknox
<commit_msg>re-order ops files<commit_after>---
groups:
- name: create
  jobs:
  - setup-infrastructure
  - deploy-cf
- name: delete
  jobs:
  - delete-cf
  - delete-infrastructure

resources:
- name: cf-deployment-concourse-tasks
  type: git
  source:
    uri: https://github.com/cloudfoundry/cf-deployment-concourse-tasks
    branch: master
- name: cli-ci
  type: git
  source:
    uri: https://github.com/cloudfoundry/cli
    branch: master
    path: ci
- name: cf-deployment
  type: git
  source:
    uri: https://github.com/cloudfoundry/cf-deployment
    branch: master
- name: ops-files
  type: git
  source:
    uri: https://github.com/cloudfoundry/cf-deployment
    branch: master
- name: state
  type: git
  source:
    uri: <EMAIL>:cloudfoundry/cli-private
    private_key: {{cli-private-github-private-key-write}}
    branch: master
    paths:
    - ci/infrastructure/hardknox/bbl-state.json
- name: cf-state
  type: git
  source:
    uri: git@github.com:cloudfoundry/cli-private
    private_key: {{cli-private-github-private-key-write}}
    branch: master
    paths:
    - ci/infrastructure/hardknox/deployment-vars.yml

jobs:
- name: setup-infrastructure
  serial_groups: [hardknox]
  build_logs_to_retain: 100
  plan:
  - aggregate:
    - get: cf-deployment-concourse-tasks
    - get: state
    - get: cli-ci
  - task: generate-credentials
    file: cli-ci/ci/infrastructure/tasks/param-to-file.yml
    input_mapping:
      input: state
    params:
      FILE_CONTENTS: {{google_account_creds}}
      OUTPUT_PATH: ci/infrastructure/hardknox/google_account_creds.json
  - task: setup-infrastructure
    file: cf-deployment-concourse-tasks/bbl-up/task.yml
    input_mapping:
      bbl-state: param_to_file_output
    params:
      BBL_IAAS: gcp
      BBL_GCP_SERVICE_ACCOUNT_KEY: google_account_creds.json
      BBL_GCP_PROJECT_ID: {{gcp_project}}
      BBL_GCP_REGION: us-central1
      BBL_GCP_ZONE: us-central1-f
      BBL_LB_CERT: {{hardknox_cf_ssl_cert}}
      BBL_LB_KEY: {{hardknox_cf_ssl_cert_private_key}}
      LB_DOMAIN: hardknox.cli.ci.cf-app.com
      BBL_ENV_NAME: hardknox
      BBL_STATE_DIR: ci/infrastructure/hardknox
    ensure:
      put: state
      params:
        repository: updated-bbl-state
        rebase: true

- name: deploy-cf
  serial_groups: [hardknox]
  build_logs_to_retain: 100
  plan:
  - aggregate:
    - get: cf-deployment-concourse-tasks
    - get: state
      passed: [setup-infrastructure]
      trigger: true
    - get: cf-state
    - get: cf-deployment
    - get: ops-files
    - get: cli-ci
  - task: upload-stemcell
    file: cf-deployment-concourse-tasks/bosh-upload-stemcell-from-cf-deployment/task.yml
    input_mapping:
      bbl-state: state
    params:
      INFRASTRUCTURE: google
      BBL_STATE_DIR: ci/infrastructure/hardknox
  - task: copy-ops-files
    file: cli-ci/ci/infrastructure/tasks/combine-inputs.yml
    input_mapping:
      input1: ops-files
      input2: cli-ci
    params:
      COPY_PATHS: "input1/operations/scale-to-one-az.yml input1/operations/tcp-routing-gcp.yml input1/operations/test/add-persistent-isolation-segment-diego-cell.yml input2/ci/infrastructure/operations/app-memory-override.yml input2/ci/infrastructure/operations/cli-isolation-cell-overrides.yml input2/ci/infrastructure/operations/skip-ssl-override.yml"
  - task: deploy-cf
    file: cf-deployment-concourse-tasks/bosh-deploy/task.yml
    input_mapping:
      bbl-state: state
      vars-store: cf-state
      ops-files: combine_inputs_output
    params:
      SYSTEM_DOMAIN: hardknox.cli.ci.cf-app.com
      OPS_FILES: "tcp-routing-gcp.yml add-persistent-isolation-segment-diego-cell.yml cli-isolation-cell-overrides.yml app-memory-override.yml skip-ssl-override.yml scale-to-one-az.yml"
      VARS_STORE_FILE: ci/infrastructure/hardknox/deployment-vars.yml
      BBL_STATE_DIR: ci/infrastructure/hardknox
    ensure:
      put: cf-state
      params:
        repository: updated-vars-store
        rebase: true

- name: delete-cf
  serial_groups: [hardknox]
  build_logs_to_retain: 100
  plan:
  - aggregate:
    - get: cf-deployment-concourse-tasks
    - get: state
  - task: delete-cf-deployment
    file: cf-deployment-concourse-tasks/bosh-delete-deployment/task.yml
    input_mapping:
      bbl-state: state
    params:
      BBL_STATE_DIR: ci/infrastructure/hardknox

{'fraction_non_alphanumeric': 0.10823665893271461, 'fraction_numerical': 0.004408352668213457, 'mean_word_length': 2.9564020192748965, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '2204919', 'n_tokens_mistral': 3147, 'n_tokens_neox': 3074, 'n_words': 498}