<commit_before>---
groups:
- name: bosh-agent
  jobs:
  - test-unit
  - test-integration
  - bosh-integration-tests
  - windows-test-unit
  - windows-test-integration-2019
  - windows-test-integration-1803
  - windows-test-integration-2012R2
  - promote
  - bump-deps

jobs:
- name: bump-deps
  public: true
  plan:
  - get: weekly
    trigger: true
  - get: bosh-agent
  - task: bump-deps
    file: bosh-agent/ci/tasks/bump-deps.yml
  - task: test-unit
    input_mapping:
      bosh-agent: bumped-bosh-agent
    file: bosh-agent/ci/tasks/test-unit.yml
  - put: bosh-agent
    params:
      repository: bumped-bosh-agent
      rebase: true

- name: test-unit
  public: true
  plan:
  - get: bosh-agent
    trigger: true
  - task: test-unit
    file: bosh-agent/ci/tasks/test-unit.yml

- name: test-integration
  public: false
  plan:
  - get: bosh-agent
    trigger: true
  - task: test-integration
    privileged: true
    file: bosh-agent/ci/tasks/test-integration.yml
    params:
      BOSH_AWS_ACCESS_KEY_ID: ((BOSH_AWS_ACCESS_KEY_ID))
      BOSH_AWS_SECRET_ACCESS_KEY: ((BOSH_AWS_SECRET_ACCESS_KEY))
      BOSH_LITE_KEYPAIR: ((BOSH_LITE_KEYPAIR))
      BOSH_LITE_SUBNET_ID: ((BOSH_LITE_SUBNET_ID))
      BOSH_LITE_NAME: ((BOSH_LITE_NAME))
      BOSH_LITE_SECURITY_GROUP: ((BOSH_LITE_SECURITY_GROUP))
      BOSH_LITE_PRIVATE_KEY: ((BOSH_LITE_PRIVATE_KEY))

- name: bosh-integration-tests
  public: true
  serial: true
  build_logs_to_retain: 250
  plan:
  - in_parallel:
    - get: bosh-src
    - get: bosh-cli
    - get: bosh-agent
      trigger: true
      passed:
      - test-unit
      - test-integration
      - windows-test-unit
      - windows-test-integration-1803
      - windows-test-integration-2019
      - windows-test-integration-2012R2

  - task: tests
    privileged: true
    file: bosh-src/ci/tasks/test-integration.yml
    tags: ["bosh-integration"]
    params:
      DB: postgresql

- name: windows-test-unit
  serial: true
  plan:
  - get: bosh-agent
    trigger: true
  - task: test-unit
    file: bosh-agent/ci/tasks/test-unit-windows.yml

- name: windows-test-integration-2019
  serial: true
  plan:
  - get: windows-ami-2019
  - get: bosh-agent
    trigger: true
  - task: test-integration
    privileged: true
    file: bosh-agent/ci/tasks/test-integration-windows.yml
    input_mapping:
      windows-ami: windows-ami-2019
    params:
      AWS_ACCESS_KEY: ((WINDOWS_AWS_ACCESS_KEY))
      AWS_SECRET_KEY: ((WINDOWS_AWS_SECRET_KEY))
      AWS_SUBNET: ((WINDOWS_AWS_SUBNET))
      AWS_SSH_KEY: ((WINDOWS_AWS_SSH_KEY))
      KEYPAIR_NAME: ((WINDOWS_AWS_KEYPAIR_NAME))
      VAGRANT_PROVIDER: aws
      WINRM_PASSWORD: ((WINRM_PASSWORD))
      WINDOWS_OS_VERSION: 2019

- name: windows-test-integration-1803
  serial: true
  plan:
  - get: windows-ami-1803
  - get: bosh-agent
    trigger: true
  - task: test-integration
    privileged: true
    file: bosh-agent/ci/tasks/test-integration-windows.yml
    input_mapping:
      windows-ami: windows-ami-1803
    params:
      AWS_ACCESS_KEY: ((WINDOWS_AWS_ACCESS_KEY))
      AWS_SECRET_KEY: ((WINDOWS_AWS_SECRET_KEY))
      AWS_SUBNET: ((WINDOWS_AWS_SUBNET))
      AWS_SSH_KEY: ((WINDOWS_AWS_SSH_KEY))
      KEYPAIR_NAME: ((WINDOWS_AWS_KEYPAIR_NAME))
      VAGRANT_PROVIDER: aws
      WINRM_PASSWORD: ((<PASSWORD>))
      WINDOWS_OS_VERSION: 1803

- name: windows-test-integration-2012R2
  serial: true
  plan:
  - get: windows-ami-2012R2
  - get: bosh-agent
    trigger: true
  - task: test-integration
    privileged: true
    file: bosh-agent/ci/tasks/test-integration-windows.yml
    input_mapping:
      windows-ami: windows-ami-2012R2
    params:
      AWS_ACCESS_KEY: ((WINDOWS_AWS_ACCESS_KEY))
      AWS_SECRET_KEY: ((WINDOWS_AWS_SECRET_KEY))
      AWS_SUBNET: ((WINDOWS_AWS_SUBNET))
      AWS_SSH_KEY: ((WINDOWS_AWS_SSH_KEY))
      KEYPAIR_NAME: ((WINDOWS_AWS_KEYPAIR_NAME))
      VAGRANT_PROVIDER: aws
      WINRM_PASSWORD: ((<PASSWORD>))
      WINDOWS_OS_VERSION: 2012R2

- name: promote
  public: true
  serial: true
  plan:
  - in_parallel:
    - trigger: true
      passed:
      - bosh-integration-tests
      get: bosh-agent
    - get: version-semver
      params: {bump: minor}
  - task: assert-version-aligns
    file: bosh-agent/ci/tasks/assert-version-aligns.yml
  - put: version-semver
    params:
      file: version-semver/number
  - put: bosh-agent-commit-status
    params:
      state: success
      commit: bosh-agent
  - put: bosh-agent-master
    params:
      repository: bosh-agent
      tag: version-semver/number
      tag_prefix: v
  - in_parallel:
    - task: build-windows
      file: bosh-agent/ci/tasks/build-windows.yml
    - task: build-linux
      file: bosh-agent/ci/tasks/build-linux.yml
    - task: build-linux-ppc64le
      file: bosh-agent/ci/tasks/build-linux-ppc64le.yml
  - put: bosh-agent-index
    params:
      files:
      - compiled-linux-*/*
      version: version-semver/number

resources:
- name: bosh-agent
  type: git
  source:
    uri: <EMAIL>:cloudfoundry/bosh-agent.git
    branch: develop
    private_key: ((BOSH_GITHUB_DEPLOYMENT_KEY))

- name: bosh-agent-master
  type: git
  source:
    uri: <EMAIL>:cloudfoundry/bosh-agent.git
    branch: master
    private_key: ((BOSH_GITHUB_DEPLOYMENT_KEY))

- name: bosh-agent-index
  type: metalink-resource
  source:
    uri: git+ssh://<EMAIL>@github.<EMAIL>:cloudfoundry/bosh-agent-index.git//
    mirror_files:
    - destination: s3://s3-external-1.amazonaws.com/((RELEASE_BUCKET_AGENT))/{{.Name}}
    options:
      private_key: ((BOSH_AGENT_INDEX_DEPLOYMENT_PRIVATE_KEY))
    url_handlers:
    - type: s3
      options:
        access_key: ((AWS_S3_BUCKET_ACCESS_KEY))
        secret_key: ((AWS_S3_BUCKET_SECRET_KEY))

- name: bosh-agent-commit-status
  type: github-status
  source:
    repository: cloudfoundry/bosh-agent
    access_token: ((repo_github_token))
    branch: develop
    context: ci/published

- name: bosh-src
  type: git
  source:
    uri: https://github.com/cloudfoundry/bosh.git
    branch: master

- name: bosh-cli
  type: s3
  source:
    regexp: alpha-bosh-cli-(.*)-linux-amd64
    bucket: bosh-cli-alpha-artifacts
    region_name: us-east-1

- name: windows-ami-2012R2
  type: ami-resource
  source:
    access_key_id: ((WINDOWS_AWS_ACCESS_KEY))
    secret_access_key: ((WINDOWS_AWS_SECRET_KEY))
    region: us-east-1
    search_options:
      filters:
      - name: name
        values:
        - Windows_Server-2012-R2_RTM-English-64Bit-Base*
      - name: state
        values:
        - available
      owners:
      - amazon

- name: windows-ami-1803
  type: ami-resource
  source:
    access_key_id: ((WINDOWS_AWS_ACCESS_KEY))
    secret_access_key: ((WINDOWS_AWS_SECRET_KEY))
    region: us-east-1
    search_options:
      filters:
      - name: name
        values:
        - Windows_Server-1803-English-Core-Base*
      - name: state
        values:
        - available
      owners:
      - amazon

- name: windows-ami-2019
  type: ami-resource
  source:
    access_key_id: ((WINDOWS_AWS_ACCESS_KEY))
    secret_access_key: ((WINDOWS_AWS_SECRET_KEY))
    region: us-east-1
    search_options:
      filters:
      - name: name
        values:
        - Windows_Server-2019-English-Core-Base*
      - name: state
        values:
        - available
      owners:
      - amazon

- name: version-semver
  type: semver
  source:
    initial_version: 0.0.1
    key: agent-current-version
    bucket: ((SEMVER_BUCKET))
    region_name: ((AWS_S3_BUCKET_REGION))
    access_key_id: ((AWS_S3_BUCKET_ACCESS_KEY))
    secret_access_key: ((AWS_S3_BUCKET_SECRET_KEY))

- name: weekly
  type: time
  source:
    start: 3:00 -0700
    stop: 4:30 -0700
    days: [Saturday]

resource_types:
- name: ami-resource
  type: registry-image
  source:
    repository: pivotalgreenhouse/ami-resource
    tag: latest
- name: github-status
  type: registry-image
  source:
    repository: dpb587/github-status-resource
    tag: master
- name: metalink-resource
  type: registry-image
  source:
    repository: dpb587/metalink-repository-resource
<commit_msg>Move windows integrations in parallel with bosh<commit_after>---
groups:
- name: bosh-agent
  jobs:
  - test-unit
  - test-integration
  - bosh-integration-tests
  - windows-test-unit
  - windows-test-integration-2019
  - windows-test-integration-1803
  - windows-test-integration-2012R2
  - promote
  - bump-deps

jobs:
- name: bump-deps
  public: true
  plan:
  - get: weekly
    trigger: true
  - get: bosh-agent
  - task: bump-deps
    file: bosh-agent/ci/tasks/bump-deps.yml
  - task: test-unit
    input_mapping:
      bosh-agent: bumped-bosh-agent
    file: bosh-agent/ci/tasks/test-unit.yml
  - put: bosh-agent
    params:
      repository: bumped-bosh-agent
      rebase: true

- name: test-unit
  public: true
  plan:
  - get: bosh-agent
    trigger: true
  - task: test-unit
    file: bosh-agent/ci/tasks/test-unit.yml

- name: test-integration
  public: false
  plan:
  - get: bosh-agent
    trigger: true
  - task: test-integration
    privileged: true
    file: bosh-agent/ci/tasks/test-integration.yml
    params:
      BOSH_AWS_ACCESS_KEY_ID: ((BOSH_AWS_ACCESS_KEY_ID))
      BOSH_AWS_SECRET_ACCESS_KEY: ((BOSH_AWS_SECRET_ACCESS_KEY))
      BOSH_LITE_KEYPAIR: ((BOSH_LITE_KEYPAIR))
      BOSH_LITE_SUBNET_ID: ((BOSH_LITE_SUBNET_ID))
      BOSH_LITE_NAME: ((BOSH_LITE_NAME))
      BOSH_LITE_SECURITY_GROUP: ((BOSH_LITE_SECURITY_GROUP))
      BOSH_LITE_PRIVATE_KEY: ((BOSH_LITE_PRIVATE_KEY))

- name: bosh-integration-tests
  public: true
  serial: true
  build_logs_to_retain: 250
  plan:
  - in_parallel:
    - get: bosh-src
    - get: bosh-cli
    - get: bosh-agent
      trigger: true
      passed:
      - test-unit
      - test-integration
      - windows-test-unit

  - task: tests
    privileged: true
    file: bosh-src/ci/tasks/test-integration.yml
    tags: ["bosh-integration"]
    params:
      DB: postgresql

- name: windows-test-unit
  serial: true
  plan:
  - get: bosh-agent
    trigger: true
  - task: test-unit
    file: bosh-agent/ci/tasks/test-unit-windows.yml

- name: windows-test-integration-2019
  serial: true
  plan:
  - get: windows-ami-2019
  - get: bosh-agent
    trigger: true
    passed:
    - test-unit
    - test-integration
    - windows-test-unit
  - task: test-integration
    privileged: true
    file: bosh-agent/ci/tasks/test-integration-windows.yml
    input_mapping:
      windows-ami: windows-ami-2019
    params:
      AWS_ACCESS_KEY: ((WINDOWS_AWS_ACCESS_KEY))
      AWS_SECRET_KEY: ((WINDOWS_AWS_SECRET_KEY))
      AWS_SUBNET: ((WINDOWS_AWS_SUBNET))
      AWS_SSH_KEY: ((WINDOWS_AWS_SSH_KEY))
      KEYPAIR_NAME: ((WINDOWS_AWS_KEYPAIR_NAME))
      VAGRANT_PROVIDER: aws
      WINRM_PASSWORD: ((WINRM_PASSWORD))
      WINDOWS_OS_VERSION: 2019

- name: windows-test-integration-1803
  serial: true
  plan:
  - get: windows-ami-1803
  - get: bosh-agent
    trigger: true
    passed:
    - test-unit
    - test-integration
    - windows-test-unit
  - task: test-integration
    privileged: true
    file: bosh-agent/ci/tasks/test-integration-windows.yml
    input_mapping:
      windows-ami: windows-ami-1803
    params:
      AWS_ACCESS_KEY: ((WINDOWS_AWS_ACCESS_KEY))
      AWS_SECRET_KEY: ((WINDOWS_AWS_SECRET_KEY))
      AWS_SUBNET: ((WINDOWS_AWS_SUBNET))
      AWS_SSH_KEY: ((WINDOWS_AWS_SSH_KEY))
      KEYPAIR_NAME: ((WINDOWS_AWS_KEYPAIR_NAME))
      VAGRANT_PROVIDER: aws
      WINRM_PASSWORD: ((<PASSWORD>))
      WINDOWS_OS_VERSION: 1803

- name: windows-test-integration-2012R2
  serial: true
  plan:
  - get: windows-ami-2012R2
  - get: bosh-agent
    trigger: true
    passed:
    - test-unit
    - test-integration
    - windows-test-unit
  - task: test-integration
    privileged: true
    file: bosh-agent/ci/tasks/test-integration-windows.yml
    input_mapping:
      windows-ami: windows-ami-2012R2
    params:
      AWS_ACCESS_KEY: ((WINDOWS_AWS_ACCESS_KEY))
      AWS_SECRET_KEY: ((WINDOWS_AWS_SECRET_KEY))
      AWS_SUBNET: ((WINDOWS_AWS_SUBNET))
      AWS_SSH_KEY: ((WINDOWS_AWS_SSH_KEY))
      KEYPAIR_NAME: ((WINDOWS_AWS_KEYPAIR_NAME))
      VAGRANT_PROVIDER: aws
      WINRM_PASSWORD: ((<PASSWORD>))
      WINDOWS_OS_VERSION: 2012R2

- name: promote
  public: true
  serial: true
  plan:
  - in_parallel:
    - trigger: true
      passed:
      - bosh-integration-tests
      - windows-test-integration-2019
      - windows-test-integration-1803
      - windows-test-integration-2012R2
      get: bosh-agent
    - get: version-semver
      params: {bump: minor}
  - task: assert-version-aligns
    file: bosh-agent/ci/tasks/assert-version-aligns.yml
  - put: version-semver
    params:
      file: version-semver/number
  - put: bosh-agent-commit-status
    params:
      state: success
      commit: bosh-agent
  - put: bosh-agent-master
    params:
      repository: bosh-agent
      tag: version-semver/number
      tag_prefix: v
  - in_parallel:
    - task: build-windows
      file: bosh-agent/ci/tasks/build-windows.yml
    - task: build-linux
      file: bosh-agent/ci/tasks/build-linux.yml
    - task: build-linux-ppc64le
      file: bosh-agent/ci/tasks/build-linux-ppc64le.yml
  - put: bosh-agent-index
    params:
      files:
      - compiled-linux-*/*
      version: version-semver/number

resources:
- name: bosh-agent
  type: git
  source:
    uri: <EMAIL>:cloudfoundry/bosh-agent.git
    branch: develop
    private_key: ((BOSH_GITHUB_DEPLOYMENT_KEY))

- name: bosh-agent-master
  type: git
  source:
    uri: <EMAIL>:cloudfoundry/bosh-agent.git
    branch: master
    private_key: ((BOSH_GITHUB_DEPLOYMENT_KEY))

- name: bosh-agent-index
  type: metalink-resource
  source:
    uri: git+ssh://git@github.com:cloudfoundry/bosh-agent-index.git//
    mirror_files:
    - destination: s3://s3-external-1.amazonaws.com/((RELEASE_BUCKET_AGENT))/{{.Name}}
    options:
      private_key: ((BOSH_AGENT_INDEX_DEPLOYMENT_PRIVATE_KEY))
    url_handlers:
    - type: s3
      options:
        access_key: ((AWS_S3_BUCKET_ACCESS_KEY))
        secret_key: ((AWS_S3_BUCKET_SECRET_KEY))

- name: bosh-agent-commit-status
  type: github-status
  source:
    repository: cloudfoundry/bosh-agent
    access_token: ((repo_github_token))
    branch: develop
    context: ci/published

- name: bosh-src
  type: git
  source:
    uri: https://github.com/cloudfoundry/bosh.git
    branch: master

- name: bosh-cli
  type: s3
  source:
    regexp: alpha-bosh-cli-(.*)-linux-amd64
    bucket: bosh-cli-alpha-artifacts
    region_name: us-east-1

- name: windows-ami-2012R2
  type: ami-resource
  source:
    access_key_id: ((WINDOWS_AWS_ACCESS_KEY))
    secret_access_key: ((WINDOWS_AWS_SECRET_KEY))
    region: us-east-1
    search_options:
      filters:
      - name: name
        values:
        - Windows_Server-2012-R2_RTM-English-64Bit-Base*
      - name: state
        values:
        - available
      owners:
      - amazon

- name: windows-ami-1803
  type: ami-resource
  source:
    access_key_id: ((WINDOWS_AWS_ACCESS_KEY))
    secret_access_key: ((WINDOWS_AWS_SECRET_KEY))
    region: us-east-1
    search_options:
      filters:
      - name: name
        values:
        - Windows_Server-1803-English-Core-Base*
      - name: state
        values:
        - available
      owners:
      - amazon

- name: windows-ami-2019
  type: ami-resource
  source:
    access_key_id: ((WINDOWS_AWS_ACCESS_KEY))
    secret_access_key: ((WINDOWS_AWS_SECRET_KEY))
    region: us-east-1
    search_options:
      filters:
      - name: name
        values:
        - Windows_Server-2019-English-Core-Base*
      - name: state
        values:
        - available
      owners:
      - amazon

- name: version-semver
  type: semver
  source:
    initial_version: 0.0.1
    key: agent-current-version
    bucket: ((SEMVER_BUCKET))
    region_name: ((AWS_S3_BUCKET_REGION))
    access_key_id: ((AWS_S3_BUCKET_ACCESS_KEY))
    secret_access_key: ((AWS_S3_BUCKET_SECRET_KEY))

- name: weekly
  type: time
  source:
    start: 3:00 -0700
    stop: 4:30 -0700
    days: [Saturday]

resource_types:
- name: ami-resource
  type: registry-image
  source:
    repository: pivotalgreenhouse/ami-resource
    tag: latest
- name: github-status
  type: registry-image
  source:
    repository: dpb587/github-status-resource
    tag: master
- name: metalink-resource
  type: registry-image
  source:
    repository: dpb587/metalink-repository-resource

{'fraction_non_alphanumeric': 0.1101130461350443, 'fraction_numerical': 0.018576229758631223, 'mean_word_length': 2.7018774033024204, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '2919413', 'n_tokens_mistral': 6381, 'n_tokens_neox': 6130, 'n_words': 1044}