<commit_before>resources:
- name: pcf-pipelines
  type: git
  source:
    uri: <EMAIL>:pivotal-cf/pcf-pipelines.git
    branch: master
    private_key: {{git_private_key}}
    paths: [ci/Dockerfile]

- name: pcf-pipelines-image
  type: docker-image
  source:
    repository: czero/cflinuxfs2
    tag: latest
    username: czero
    password: {{c<PASSWORD>_dockerhub_password}}

- name: pcf-pipelines-image-rc
  type: docker-image
  source:
    repository: czero/cflinuxfs2
    tag: release-candidate
    username: czero
    password: {{czero_dockerhub_password}}

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

- name: om
  type: github-release
  source:
    user: pivotal-cf
    repository: om
    access_token: {{github_token}}

- name: yaml-patch 
  type: github-release
  source:
    user: krishicks
    repository: yaml-patch 
    access_token: {{github_token}}

- name: cf-cli-tarball
  type: s3
  source:
    bucket: cf-cli-releases
    regexp: releases/v([\d\.]+)/cf-cli_.*_linux_x86-64.tgz
    region_name: us-west-1

- name: cliaas
  type: github-release
  source:
    user: pivotal-cf
    repository: cliaas
    access_token: {{github_token}}

- name: pivnet-cli
  type: github-release
  source:
    user: pivotal-cf
    repository: pivnet-cli
    access_token: {{github_token}}

- name: govc
  type: github-release
  source:
    user: vmware
    repository: govmomi
    access_token: {{github_token}}

- name: om-beta
  type: github-release
  source:
    user: c0-ops
    repository: om
    access_token: {{github_token}}

- name: stemcell-downloader
  type: github-release
  source:
    user: pivotal-cf
    repository: pcf-product-stemcell-downloader
    access_token: {{github_token}}

jobs:
- name: build-pcf-pipelines-image
  serial_groups: [pcf-pipelines-image]
  plan:
  - aggregate:
    - get: pcf-pipelines
      trigger: true
    - get: cflinuxfs2
      trigger: true
      params: {save: true}
    - get: yaml-patch 
      params: {globs: ["*linux*"]}
    - get: om
      params: {globs: ["*linux*"]}
    - get: cf-cli-tarball
    - get: cliaas
      params: {globs: ["*linux*"]}
    - get: pivnet-cli
      params: {globs: ["*linux*"]}
    - get: govc
      params: {globs: ["*linux_amd64*"]}
    - get: om-beta
      params: {globs: ["*linux*"]}
      version: { tag: '0.17-beta.0' }
    - get: stemcell-downloader
      params: {globs: ["*linux*"]}

  - task: prepare-workspace
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: busybox}
      inputs:
      - name: pcf-pipelines
      - name: om
      - name: yaml-patch 
      - name: cf-cli-tarball
      - name: cliaas
      - name: pivnet-cli
      - name: govc
      - name: om-beta
      - name: stemcell-downloader
      outputs:
      - name: workspace
      run:
        path: sh
        args:
        - -c
        - |
          cp pcf-pipelines/ci/Dockerfile workspace

          cp om/om-linux workspace
          chmod +x workspace/om-linux

          cp yaml-patch/yaml_patch_linux workspace
          chmod +x workspace/yaml_patch_linux

          tar -C workspace -xf cf-cli-tarball/*.tgz cf
          chmod +x workspace/cf

          cp cliaas/cliaas-linux workspace
          chmod +x workspace/cliaas-linux

          cp pivnet-cli/pivnet-linux-* workspace/pivnet-cli
          chmod +x workspace/pivnet-cli

          gunzip govc/govc_linux_amd64.gz
          cp govc/govc_linux_amd64 workspace/govc
          chmod +x workspace/govc

          cp om-beta/om-linux workspace/om-linux-beta
          chmod +x workspace/om-linux-beta

          cp stemcell-downloader/stemcell-downloader-linux workspace/stemcell-downloader
          chmod +x workspace/stemcell-downloader

  - put: pcf-pipelines-image-rc
    params:
      load_base: cflinuxfs2
      build: workspace

- name: test-pcf-pipelines-image
  serial_groups: [pcf-pipelines-image]
  plan:
  - get: pcf-pipelines-image-rc
    trigger: true
    passed: [build-pcf-pipelines-image]
    params:
      skip_download: true
  - task: test-for-required-binaries
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: czero/cflinuxfs2
          tag: release-candidate
      run:
        path: sh
        args:
        - -c
        - |
          set -e
          which om-linux
          which yaml_patch_linux <commit_msg>fix incorrect newling character in yaml task bash<commit_after>resources:
- name: pcf-pipelines
  type: git
  source:
    uri: git@github.com:pivotal-cf/pcf-pipelines.git
    branch: master
    private_key: {{git_private_key}}
    paths: [ci/Dockerfile]

- name: pcf-pipelines-image
  type: docker-image
  source:
    repository: czero/cflinuxfs2
    tag: latest
    username: czero
    password: {{c<PASSWORD>_dockerhub_password}}

- name: pcf-pipelines-image-rc
  type: docker-image
  source:
    repository: czero/cflinuxfs2
    tag: release-candidate
    username: czero
    password: {{<PASSWORD>}}

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

- name: om
  type: github-release
  source:
    user: pivotal-cf
    repository: om
    access_token: {{github_token}}

- name: yaml-patch 
  type: github-release
  source:
    user: krishicks
    repository: yaml-patch 
    access_token: {{github_token}}

- name: cf-cli-tarball
  type: s3
  source:
    bucket: cf-cli-releases
    regexp: releases/v([\d\.]+)/cf-cli_.*_linux_x86-64.tgz
    region_name: us-west-1

- name: cliaas
  type: github-release
  source:
    user: pivotal-cf
    repository: cliaas
    access_token: {{github_token}}

- name: pivnet-cli
  type: github-release
  source:
    user: pivotal-cf
    repository: pivnet-cli
    access_token: {{github_token}}

- name: govc
  type: github-release
  source:
    user: vmware
    repository: govmomi
    access_token: {{github_token}}

- name: om-beta
  type: github-release
  source:
    user: c0-ops
    repository: om
    access_token: {{github_token}}

- name: stemcell-downloader
  type: github-release
  source:
    user: pivotal-cf
    repository: pcf-product-stemcell-downloader
    access_token: {{github_token}}

jobs:
- name: build-pcf-pipelines-image
  serial_groups: [pcf-pipelines-image]
  plan:
  - aggregate:
    - get: pcf-pipelines
      trigger: true
    - get: cflinuxfs2
      trigger: true
      params: {save: true}
    - get: yaml-patch 
      params: {globs: ["*linux*"]}
    - get: om
      params: {globs: ["*linux*"]}
    - get: cf-cli-tarball
    - get: cliaas
      params: {globs: ["*linux*"]}
    - get: pivnet-cli
      params: {globs: ["*linux*"]}
    - get: govc
      params: {globs: ["*linux_amd64*"]}
    - get: om-beta
      params: {globs: ["*linux*"]}
      version: { tag: '0.17-beta.0' }
    - get: stemcell-downloader
      params: {globs: ["*linux*"]}

  - task: prepare-workspace
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: busybox}
      inputs:
      - name: pcf-pipelines
      - name: om
      - name: yaml-patch 
      - name: cf-cli-tarball
      - name: cliaas
      - name: pivnet-cli
      - name: govc
      - name: om-beta
      - name: stemcell-downloader
      outputs:
      - name: workspace
      run:
        path: sh
        args:
        - -c
        - |
          cp pcf-pipelines/ci/Dockerfile workspace

          cp om/om-linux workspace
          chmod +x workspace/om-linux

          cp yaml-patch/yaml_patch_linux workspace
          chmod +x workspace/yaml_patch_linux

          tar -C workspace -xf cf-cli-tarball/*.tgz cf
          chmod +x workspace/cf

          cp cliaas/cliaas-linux workspace
          chmod +x workspace/cliaas-linux

          cp pivnet-cli/pivnet-linux-* workspace/pivnet-cli
          chmod +x workspace/pivnet-cli

          gunzip govc/govc_linux_amd64.gz
          cp govc/govc_linux_amd64 workspace/govc
          chmod +x workspace/govc

          cp om-beta/om-linux workspace/om-linux-beta
          chmod +x workspace/om-linux-beta

          cp stemcell-downloader/stemcell-downloader-linux workspace/stemcell-downloader
          chmod +x workspace/stemcell-downloader

  - put: pcf-pipelines-image-rc
    params:
      load_base: cflinuxfs2
      build: workspace

- name: test-pcf-pipelines-image
  serial_groups: [pcf-pipelines-image]
  plan:
  - get: pcf-pipelines-image-rc
    trigger: true
    passed: [build-pcf-pipelines-image]
    params:
      skip_download: true
  - task: test-for-required-binaries
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: czero/cflinuxfs2
          tag: release-candidate
      run:
        path: sh
        args:
        - -c
        - |
          set -e
          which om-linux
          which yaml_patch_linux
{'fraction_non_alphanumeric': 0.10964421570821213, 'fraction_numerical': 0.005370328932647125, 'mean_word_length': 2.1743607954545454, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6236427', 'n_tokens_mistral': 3207, 'n_tokens_neox': 3033, 'n_words': 675}