<commit_before>resource_types:
- name: pivnet
  type: docker-image
  source:
    repository: pivotalcf/pivnet-resource
    tag: latest-final

- name: curl
  type: docker-image
  source:
    repository: pivotalservices/concourse-curl-resource
    tag: latest

resources:
- name: operations-manager
  type: pivnet
  source:
    api_token: {{pivnet_token}}
    product_slug: ops-manager
    product_version: {{operations_manager_regex}}
    sort_by: semver

- name: operations-manager-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/ops-manager/ops-manager-(.*).tar"

- name: elastic-runtime
  type: pivnet
  source:
    api_token: {{pivnet_token}}
    product_slug: elastic-runtime
    product_version: {{elastic_runtime_regex}}
    sort_by: semver

- name: elastic-runtime-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/elastic-runtime/elastic-runtime-(.*).tar"

- name: stemcell-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/stemcells/bosh-stemcell-(.*)-.*.tgz"
    disable_ssl: false

- name: czero-cflinuxfs2
  type: docker-image
  source:
    repository: czero/cflinuxfs2
    tag: latest

- name: czero-cflinuxfs2-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/czero-cflinuxfs2/czero-cflinuxfs2-(.*)-.*.tar"

- name: pcf-pipelines-tarball
  type: pivnet
  source:
    api_token: {{pivnet_token}}
    product_slug: pcf-automation

- name: pcf-pipelines-offline-pinned-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/pcf-pipelines/pcf-pipelines-v(.*).tgz"

- name: pcf-pipelines-combined
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "pcf-pipelines-combined/pcf-pipelines-combined-(.*).tar"

- name: fly
  type: curl
  source:
    url: "((atc_external_url))/api/v1/cli?arch=amd64&platform=linux"
    filename: fly
    skip_ssl_verification: true

- name: pcf-pipelines-combined-version
  type: semver
  source:
    initial_version: 0.0.0
    driver: s3
    bucket: {{s3_bucket}}
    key: "pcf-pipelines-combined/version"
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}

jobs:
- name: collector
  plan:
  - aggregate:
    - get: pcf-pipelines-tarball
    - get: czero-cflinuxfs2
    - get: operations-manager
      params: { globs: [] }
    - get: elastic-runtime
      params: { globs: [] }
    - put: pcf-pipelines-combined-version
      params: { bump: major }

- name: create-ops-manager-tarball
  plan:
  - aggregate:
    - get: pcf-pipelines-combined-version
      trigger: true
      passed: [collector]
    - get: pcf-pipelines-tarball
      passed: [collector]
    - get: operations-manager
      params:
        globs: ["*.ova"]
      passed: [collector]
  - task: create-tarball
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: czero/cflinuxfs2
      inputs:
      - name: operations-manager
      outputs:
      - name: ops-manager-tarball
      run:
        path: bash
        args:
        - -c
        - |
          set -eu

          version=$(cat operations-manager/metadata.json | jq --raw-output '.Release.Version')

          echo "Creating tarball with version ${version}..."
          tar cf "ops-manager-tarball/ops-manager-${version}.tar" -C operations-manager .
  - put: operations-manager-tarball
    params:
      file: "ops-manager-tarball/ops-manager-*.tar"

- name: create-elastic-runtime-tarball
  plan:
  - aggregate:
    - get: pcf-pipelines-combined-version
      trigger: true
      passed: [collector]
    - get: pcf-pipelines-tarball
      passed: [collector]
    - get: elastic-runtime
      passed: [collector]
      params:
        globs: ["*.pivotal"]<commit_msg>Remove unnecessary gets of pcf-pipelines-tarball<commit_after>resource_types:
- name: pivnet
  type: docker-image
  source:
    repository: pivotalcf/pivnet-resource
    tag: latest-final

- name: curl
  type: docker-image
  source:
    repository: pivotalservices/concourse-curl-resource
    tag: latest

resources:
- name: operations-manager
  type: pivnet
  source:
    api_token: {{pivnet_token}}
    product_slug: ops-manager
    product_version: {{operations_manager_regex}}
    sort_by: semver

- name: operations-manager-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/ops-manager/ops-manager-(.*).tar"

- name: elastic-runtime
  type: pivnet
  source:
    api_token: {{pivnet_token}}
    product_slug: elastic-runtime
    product_version: {{elastic_runtime_regex}}
    sort_by: semver

- name: elastic-runtime-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/elastic-runtime/elastic-runtime-(.*).tar"

- name: stemcell-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/stemcells/bosh-stemcell-(.*)-.*.tgz"
    disable_ssl: false

- name: czero-cflinuxfs2
  type: docker-image
  source:
    repository: czero/cflinuxfs2
    tag: latest

- name: czero-cflinuxfs2-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/czero-cflinuxfs2/czero-cflinuxfs2-(.*)-.*.tar"

- name: pcf-pipelines-tarball
  type: pivnet
  source:
    api_token: {{pivnet_token}}
    product_slug: pcf-automation

- name: pcf-pipelines-offline-pinned-tarball
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "staging/pcf-pipelines/pcf-pipelines-v(.*).tgz"

- name: pcf-pipelines-combined
  type: s3
  source:
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}
    bucket: {{s3_bucket}}
    regexp: "pcf-pipelines-combined/pcf-pipelines-combined-(.*).tar"

- name: fly
  type: curl
  source:
    url: "((atc_external_url))/api/v1/cli?arch=amd64&platform=linux"
    filename: fly
    skip_ssl_verification: true

- name: pcf-pipelines-combined-version
  type: semver
  source:
    initial_version: 0.0.0
    driver: s3
    bucket: {{s3_bucket}}
    key: "pcf-pipelines-combined/version"
    access_key_id: {{s3_access_key_id}}
    secret_access_key: {{s3_secret_access_key}}
    endpoint: {{s3_endpoint}}

jobs:
- name: collector
  plan:
  - aggregate:
    - get: pcf-pipelines-tarball
    - get: czero-cflinuxfs2
    - get: operations-manager
      params: { globs: [] }
    - get: elastic-runtime
      params: { globs: [] }
    - put: pcf-pipelines-combined-version
      params: { bump: major }

- name: create-ops-manager-tarball
  plan:
  - aggregate:
    - get: pcf-pipelines-combined-version
      trigger: true
      passed: [collector]
    - get: operations-manager
      params:
        globs: ["*.ova"]
      passed: [collector]
  - task: create-tarball
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: czero/cflinuxfs2
      inputs:
      - name: operations-manager
      outputs:
      - name: ops-manager-tarball
      run:
        path: bash
        args:
        - -c
        - |
          set -eu

          version=$(cat operations-manager/metadata.json | jq --raw-output '.Release.Version')

          echo "Creating tarball with version ${version}..."
          tar cf "ops-manager-tarball/ops-manager-${version}.tar" -C operations-manager .
  - put: operations-manager-tarball
    params:
      file: "ops-manager-tarball/ops-manager-*.tar"

- name: create-elastic-runtime-tarball
  plan:
  - aggregate:
    - get: pcf-pipelines-combined-version
      trigger: true
      passed: [collector]
    - get: elastic-runtime
      passed: [collector]
      params:
        globs: ["*.pivotal"]
{'fraction_non_alphanumeric': 0.12797852108736996, 'fraction_numerical': 0.010739456315024052, 'mean_word_length': 2.9680426098535286, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7310598', 'n_tokens_mistral': 3309, 'n_tokens_neox': 3201, 'n_words': 585}