<commit_before>---
groups:
  - name: bosh-google-cpi-release
    jobs:
      - test-unit
      - build-candidate
      - setup-infrastructure
      - deploy-ubuntu
      - run-bats
      - run-int
      - teardown-infrastructure
      - promote-candidate-major
      - promote-candidate-minor
      - promote-candidate-patch

jobs:
  - name: test-unit
    plan:
      - in_parallel:
        - {trigger: true, get: bosh-cpi-src, resource: bosh-cpi-src-in}
        - {get: ci}
      - task: unit-tests
        file: ci/ci/tasks/unit-tests.yml

  - name: build-candidate
    serial: true
    plan:
      - in_parallel:
        - {trigger: true, passed: [test-unit], get: bosh-cpi-src,   resource: bosh-cpi-src-in}
        - {trigger: false,                     get: version-semver, params: {bump: patch}}
        - {get: ci}
      - put: version-semver
        params: {file: version-semver/number}

      - task: build-release
        file: ci/ci/tasks/build-candidate.yml

      - put: bosh-cpi-dev-artifacts
        params: {file: candidate/*.tgz}

      - put: bosh-cpi-dev-artifacts-sha1
        params: {file: candidate/*.tgz.sha1}

  - name: setup-infrastructure
    serial_groups: [run-bats, run-int]
    plan:
      - in_parallel:
        - {trigger: true, passed: [build-candidate], get: bosh-cpi-src, resource: bosh-cpi-src-in}
        - {trigger: true,                            get: stemcell, resource: google-ubuntu-stemcell}
        - {get: ci}
      - in_parallel: &teardown_step
        - task: teardown-infrastructure
          file: ci/ci/tasks/teardown-infrastructure.yml
          params:
            google_auto_network: ((google_auto_network))
            google_json_key_data: ((google_json_key_data))
            google_network: ((google_network))
            google_project: ((google_project))
            google_region: ((google_region))
            google_zone: ((google_zone))
      - put: infrastructure
        params:
          env_name: ((cpi_source_branch))
          terraform_source: ci/ci/test_infrastructure
          delete_on_failure: true
      # delete VM created for regional backend service hack
      - in_parallel: *teardown_step

  - name: teardown-infrastructure
    serial_groups: [run-bats, run-int]
    plan:
      - in_parallel:
        - {trigger: true,  passed: [run-bats, run-int],   get: bosh-cpi-src, resource: bosh-cpi-src-in}
        - {trigger: false, passed: [run-bats],            get: bosh-cpi-release, resource: bosh-cpi-dev-artifacts}
        - {trigger: false, passed: [run-bats],            get: director-creds, resource: director-creds}
        - {trigger: false, passed: [deploy-ubuntu],       get: director-state, resource: director-state}
        - {trigger: false, passed: [run-bats, run-int],   get: infrastructure, resource: infrastructure}
        - {trigger: false, passed: [run-bats, run-int],   get: stemcell, resource: google-ubuntu-stemcell}
        - {trigger: false,                                get: bosh-cli}
        - {trigger: false,                                get: bosh-deployment}
        - {get: ci}
      - in_parallel: *teardown_step
      - task: setup-deployment
        file: ci/ci/tasks/setup-deployment.yml
      - task: teardown-director
        file: ci/ci/tasks/teardown-director.yml
        params:
          google_project:                 ((google_project))
          google_region:                  ((google_region))
          google_zone:                    ((google_zone))
          cpi_source_branch:              ((cpi_source_branch))
          google_test_bucket_name:        ((google_test_bucket_name))
          google_subnetwork_range:        ((google_subnetwork_range))
          google_subnetwork_gw:           ((google_subnetwork_gw))
          google_address_static_director: ((google_address_static_director))
          google_json_key_data:           ((google_json_key_data))
          private_key_user:               ((private_key_user))
          private_key_data:               ((private_key_data))
      - put: infrastructure
        params:
          env_name: ((cpi_source_branch))
          terraform_source: ci/ci/test_infrastructure
          action: destroy
        get_params:
          terraform_source: ci/ci/test_infrastructure
          action: destroy

  - name: deploy-ubuntu
    serial_groups: [run-bats]
    plan:
      - in_parallel:
        - {trigger: true, passed: [build-candidate, setup-infrastructure],  get: bosh-cpi-src, resource: bosh-cpi-src-in}
        - {trigger: true, passed: [build-candidate],                        get: bosh-cpi-release, resource: bosh-cpi-dev-artifacts}
        - {trigger: true, passed: [setup-infrastructure],                   get: infrastructure, resource: infrastructure}
        - {trigger: true, passed: [setup-infrastructure],                   get: stemcell, resource: google-ubuntu-stemcell}
        - {trigger: false,                                                  get: bosh-cli}
        - {trigger: false,                                                  get: bosh-deployment}
        - {get: ci}
      - task: setup-deployment
        file: ci/ci/tasks/setup-deployment.yml
      - task: setup-director
        file: ci/ci/tasks/setup-director.yml
        params:
          cpi_source_branch:              ((cpi_source_branch))<commit_msg>Deploy-ubuntu also uses same resources as run-int [#174536032]<commit_after>---
groups:
  - name: bosh-google-cpi-release
    jobs:
      - test-unit
      - build-candidate
      - setup-infrastructure
      - deploy-ubuntu
      - run-bats
      - run-int
      - teardown-infrastructure
      - promote-candidate-major
      - promote-candidate-minor
      - promote-candidate-patch

jobs:
  - name: test-unit
    plan:
      - in_parallel:
        - {trigger: true, get: bosh-cpi-src, resource: bosh-cpi-src-in}
        - {get: ci}
      - task: unit-tests
        file: ci/ci/tasks/unit-tests.yml

  - name: build-candidate
    serial: true
    plan:
      - in_parallel:
        - {trigger: true, passed: [test-unit], get: bosh-cpi-src,   resource: bosh-cpi-src-in}
        - {trigger: false,                     get: version-semver, params: {bump: patch}}
        - {get: ci}
      - put: version-semver
        params: {file: version-semver/number}

      - task: build-release
        file: ci/ci/tasks/build-candidate.yml

      - put: bosh-cpi-dev-artifacts
        params: {file: candidate/*.tgz}

      - put: bosh-cpi-dev-artifacts-sha1
        params: {file: candidate/*.tgz.sha1}

  - name: setup-infrastructure
    serial_groups: [run-bats, run-int]
    plan:
      - in_parallel:
        - {trigger: true, passed: [build-candidate], get: bosh-cpi-src, resource: bosh-cpi-src-in}
        - {trigger: true,                            get: stemcell, resource: google-ubuntu-stemcell}
        - {get: ci}
      - in_parallel: &teardown_step
        - task: teardown-infrastructure
          file: ci/ci/tasks/teardown-infrastructure.yml
          params:
            google_auto_network: ((google_auto_network))
            google_json_key_data: ((google_json_key_data))
            google_network: ((google_network))
            google_project: ((google_project))
            google_region: ((google_region))
            google_zone: ((google_zone))
      - put: infrastructure
        params:
          env_name: ((cpi_source_branch))
          terraform_source: ci/ci/test_infrastructure
          delete_on_failure: true
      # delete VM created for regional backend service hack
      - in_parallel: *teardown_step

  - name: teardown-infrastructure
    serial_groups: [run-bats, run-int]
    plan:
      - in_parallel:
        - {trigger: true,  passed: [run-bats, run-int],   get: bosh-cpi-src, resource: bosh-cpi-src-in}
        - {trigger: false, passed: [run-bats],            get: bosh-cpi-release, resource: bosh-cpi-dev-artifacts}
        - {trigger: false, passed: [run-bats],            get: director-creds, resource: director-creds}
        - {trigger: false, passed: [deploy-ubuntu],       get: director-state, resource: director-state}
        - {trigger: false, passed: [run-bats, run-int],   get: infrastructure, resource: infrastructure}
        - {trigger: false, passed: [run-bats, run-int],   get: stemcell, resource: google-ubuntu-stemcell}
        - {trigger: false,                                get: bosh-cli}
        - {trigger: false,                                get: bosh-deployment}
        - {get: ci}
      - in_parallel: *teardown_step
      - task: setup-deployment
        file: ci/ci/tasks/setup-deployment.yml
      - task: teardown-director
        file: ci/ci/tasks/teardown-director.yml
        params:
          google_project:                 ((google_project))
          google_region:                  ((google_region))
          google_zone:                    ((google_zone))
          cpi_source_branch:              ((cpi_source_branch))
          google_test_bucket_name:        ((google_test_bucket_name))
          google_subnetwork_range:        ((google_subnetwork_range))
          google_subnetwork_gw:           ((google_subnetwork_gw))
          google_address_static_director: ((google_address_static_director))
          google_json_key_data:           ((google_json_key_data))
          private_key_user:               ((private_key_user))
          private_key_data:               ((private_key_data))
      - put: infrastructure
        params:
          env_name: ((cpi_source_branch))
          terraform_source: ci/ci/test_infrastructure
          action: destroy
        get_params:
          terraform_source: ci/ci/test_infrastructure
          action: destroy

  - name: deploy-ubuntu
    serial_groups: [run-bats, run-int]
    plan:
      - in_parallel:
        - {trigger: true, passed: [build-candidate, setup-infrastructure],  get: bosh-cpi-src, resource: bosh-cpi-src-in}
        - {trigger: true, passed: [build-candidate],                        get: bosh-cpi-release, resource: bosh-cpi-dev-artifacts}
        - {trigger: true, passed: [setup-infrastructure],                   get: infrastructure, resource: infrastructure}
        - {trigger: true, passed: [setup-infrastructure],                   get: stemcell, resource: google-ubuntu-stemcell}
        - {trigger: false,                                                  get: bosh-cli}
        - {trigger: false,                                                  get: bosh-deployment}
        - {get: ci}
      - task: setup-deployment
        file: ci/ci/tasks/setup-deployment.yml
      - task: setup-director
        file: ci/ci/tasks/setup-director.yml
        params:
          cpi_source_branch:              ((cpi_source_branch))
{'fraction_non_alphanumeric': 0.11242769173353237, 'fraction_numerical': 0.0012129128568762828, 'mean_word_length': 1.8477683315621678, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '569121', 'n_tokens_mistral': 3291, 'n_tokens_neox': 3192, 'n_words': 627}