<commit_before>resource_types:
  - name: concourse2tracker
    type: docker-image
    source:
      repository: cfbuildpacks/concourse2tracker
  - name: slack-notification
    type: docker-image
    source:
      repository: cfcommunity/slack-notification-resource
resources:
  - name: binary-builder
    type: git
    source:
      uri: {{binary-builder-git-uri}}
  - name: buildpacks-ci
    type: git
    source:
      uri: {{buildpacks-ci-git-uri-public}}
  - name: builds-out
    type: git
    source:
      branch: binary-builds
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
  - name: build-tar
    type: s3
    source:
      bucket: {{buildpacks-binaries-s3-bucket}}
      versioned_file: /concourse-artifacts/binary-builder-source.tgz
      access_key_id: {{pivotal-buildpacks-s3-access-key}}
      secret_access_key: {{pivotal-buildpacks-s3-secret-key}}
  - name: concourse2tracker
    type: concourse2tracker
  - name: failure-alert
    type: slack-notification
    source:
      url: {{concourse-job-failure-notifications-slack-webhook}}
  - name: cf-edge-environments
    type: pool
    source:
      branch: resource-pools
      pool: cf-edge-environments
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
<% %w(go bundler composer glide godep httpd jruby php php7 python node nginx ruby).each do |dep| %>
  - name: <%= dep %>-builds
    type: git
    source:
      branch: binary-builds
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
      paths: [ <%= dep %>-builds.yml ]
  - name: <%= dep %>-built-output
    type: git
    source:
      branch: binary-built-output
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
      paths: [ <%= dep %>-built.yml ]
<% end %>

<% %w(composer glide godep nginx node).each do |auto_dep| %>
  - name: <%= auto_dep %>-builds-in
    type: git
    source:
      branch: binary-builds
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
      paths: [ <%= auto_dep %>-builds.yml ]
<% end %>

<% %w(composer glide godep).each do |auto_old| %>
  - name: <%= auto_old %>-new-releases
    type: git
    source:
      uri: {{buildpacks-ci-git-uri}}
      branch: new-release-notifications
      private_key: {{buildpacks-ci-private-key}}
      paths: [ <%= auto_old %>.yaml ]
<% end %>

<% %w(nginx node).each do |auto_new| %>
  - name: <%= auto_new %>-new-releases
    type: git
    source:
      uri: {{buildpacks-ci-git-uri}}
      branch: new-release-notifications
      private_key: {{buildpacks-ci-private-key}}
      paths: [ <%= auto_new %>-new.yaml ]
<% end %>

<% %w(go nodejs ruby php staticfile).each do |language| %>
  - name: <%= language %>-buildpack
    type: git
    source:
      uri: git@github.com:<%= organization %>/<%= language %>-buildpack.git
      private_key: {{<%= language %>-buildpack-private-key}}
      branch: develop
      ignore_paths:
        - VERSION
        - CHANGELOG
<% end %>

groups:
  - name: enqueue-automated-builds
    jobs:
<% %w(composer glide godep nginx node).each do |auto_dep| %>
    - trigger-<%= auto_dep %>-build
<% end %>
  - name: automated-builds
    jobs:
<% %w(composer glide godep nginx node).each do |auto_dep| %>
    - build-<%= auto_dep %>
<% end %>
<% {go: ["godep", "glide"], staticfile: ["nginx"], php: ["nginx", "composer"], nodejs: ["node"], ruby: ["node"]}.each do |buildpack, dependencies| %>
  <% dependencies.each do |dependency| %>
    - update-<%= dependency %>-in-<%= buildpack %>-buildpack
  <% end %>
<% end %>
    - test-node
    - test-nginx
  - name: manual-builds
    jobs:
<% %w(go php php7 ruby jruby bundler python httpd).each do |dependency| %>
    - build-<%= dependency %>
<% end %>
    - test-php
    - test-php7
    - test-python
    - test-jruby
    - test-ruby
  - name: binary-builder
    jobs:
      - binary-builder


jobs:
  - name: binary-builder
    serial: true
    plan:
      - aggregate:
        - get: buildpacks-ci
        - get: binary-builder
          trigger: true
      - do:
        - aggregate:
          - task: rspec-1
            file: buildpacks-ci/tasks/binary-builder.yml
            params: { TOTAL_GROUPS: 4, CURRENT_GROUP: 1, RUBYGEM_MIRROR: {{rubygem-mirror}} }
            privileged: true
          - task: rspec-2
            file: buildpacks-ci/tasks/binary-builder.yml
            params: { TOTAL_GROUPS: 4, CURRENT_GROUP: 2, RUBYGEM_MIRROR: {{rubygem-mirror}} }
            privileged: true
          - task: rspec-3
            file: buildpacks-ci/tasks/binary-builder.yml
            params: { TOTAL_GROUPS: 4, CURRENT_GROUP: 3, RUBYGEM_MIRROR: {{rubygem-mirror}}  }
            privileged: true
          - task: rspec-4
            file: buildpacks-ci/tasks/binary-builder.yml
            params: { TOTAL_GROUPS: 4, CURRENT_GROUP: 4, RUBYGEM_MIRROR: {{rubygem-mirror}} }
            privileged: true
        on_failure:
          put: failure-alert
          params:
            text: "binary-builder binary-builder job on Concourse failed! \n Check: https://buildpacks.ci.cf-app.com/pipelines/binary-builder/jobs/binary-builder"
            channel: {{concourse-job-failure-notifications-slack-channel}}
            username: concourse
            icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% %w(go php php7 ruby jruby bundler python httpd).each do |dependency| %>
  - name: build-<%= dependency %>
    serial: true
    plan:
      - aggregate:
        - get: builds-yaml
          resource: <%= dependency %>-builds
          trigger: true
        - get: binary-builder
          passed: [binary-builder]
        - get: buildpacks-ci
        - get: built-yaml
          resource: <%= dependency %>-built-output
      - do:
        - task: build-binary
          file: buildpacks-ci/tasks/build-binary.yml
          params:
            BINARY_NAME: <%= dependency %>
            GIT_SSH_KEY: {{buildpacks-ci-private-key}}
          privileged: true
        - put: build-tar
          params:
            file: binary-builder-artifacts/final-artifact/*
        - task: push-binary
          file: buildpacks-ci/tasks/push-binary.yml
          params:
            BINARY_NAME: <%= dependency %>
            BUCKET_NAME: {{buildpacks-binaries-s3-bucket}}
            AWS_ACCESS_KEY_ID: {{pivotal-buildpacks-s3-access-key}}
            AWS_SECRET_ACCESS_KEY: {{pivotal-buildpacks-s3-secret-key}}
            AWS_DEFAULT_REGION: us-east-1
          privileged: true
        - put: builds-out
          params:
            repository: builds-yaml-artifacts
            rebase: true
        - put: concourse2tracker
          params:
            api_token: {{pivotal-tracker-api-token}}
            git_path: builds-yaml
            project_id: {{cf-buildpacks-public-tracker-id}}
        on_failure:
          put: failure-alert
          params:
            text: "binary-builder build-<%= dependency %> job on Concourse failed! \n Check: https://buildpacks.ci.cf-app.com/pipelines/binary-builder/jobs/build-<%= dependency %>"
            channel: {{concourse-job-failure-notifications-slack-channel}}
            username: concourse
            icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% end %>
  - name: test-php
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-php ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-php.yml
  - name: test-jruby
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-jruby ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-jruby.yml
  - name: test-python
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-python ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-python.yml
  - name: test-ruby
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-ruby ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-ruby.yml
  - name: test-node
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-node ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-node.yml
  - name: test-php7
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-php7 ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-php7.yml
  - name: test-nginx
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-nginx ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-nginx.yml
<% %w(godep composer glide nginx node).each do |dependency| %>
  - name: trigger-<%= dependency %>-build
    serial: true
    plan:
      - aggregate:
        - get: buildpacks-ci
        - get: new-releases
          resource: <%= dependency %>-new-releases
          trigger: true
        - get: binary-builds
          resource: <%= dependency %>-builds
      - task: queue-binary-build
        file: buildpacks-ci/tasks/queue-dependency-build.yml
        params:
          DEPENDENCY: <%= dependency %>
      - put: <%= dependency %>-builds
        params:
          repository: binary-builds-artifacts
          rebase: true
  - name: build-<%= dependency %>
    serial: true
    plan:
      - aggregate:
        - get: built-yaml
          resource: <%= dependency %>-built-output
        - get: builds-yaml
          resource: <%= dependency %>-builds-in
          version: every
          trigger: true
        - get: binary-builder
          passed: [binary-builder]
        - get: buildpacks-ci
      - do:
        - task: build-binary
          file: buildpacks-ci/tasks/build-binary.yml
          params:
            GIT_SSH_KEY: {{buildpacks-ci-private-key}}
            BINARY_NAME: <%= dependency %>
          privileged: true
        - put: build-tar
          params:
            file: binary-builder-artifacts/final-artifact/*
        - task: push-binary
          file: buildpacks-ci/tasks/push-binary.yml
          params:
            BINARY_NAME: <%= dependency %>
            BUCKET_NAME: {{buildpacks-binaries-s3-bucket}}
            AWS_ACCESS_KEY_ID: {{pivotal-buildpacks-s3-access-key}}
            AWS_SECRET_ACCESS_KEY: {{pivotal-buildpacks-s3-secret-key}}
            AWS_DEFAULT_REGION: us-east-1
          privileged: true
        - put: builds-out
          resource: <%= dependency %>-built-output
          params:
            repository: builds-yaml-artifacts
            rebase: true
        - put: concourse2tracker
          params:
            api_token: {{pivotal-tracker-api-token}}
            git_path: builds-yaml
            project_id: {{cf-buildpacks-public-tracker-id}}
        on_failure:
          put: failure-alert
          params:
            text: "binary-builder build-<%= dependency %> job on Concourse failed! \n Check: https://buildpacks.ci.cf-app.com/pipelines/binary-builder/jobs/build-<%= dependency %>"
            channel: {{concourse-job-failure-notifications-slack-channel}}
            username: concourse
            icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% end %>
<% {go: ["godep", "glide"], staticfile: ["nginx"], php: ["nginx", "composer"], nodejs: ["node"], ruby: ["node"]}.each do |buildpack, dependencies| %>
  <% dependencies.each do |dependency| %>
  - name: update-<%= dependency %>-in-<%= buildpack %>-buildpack
    serial: true
    plan:
      - do:
        - aggregate:
          - get: buildpacks-ci
          - get: buildpack
            resource: <%= buildpack %>-buildpack
          - get: built-out
            resource: <%= dependency %>-built-output
            passed: [ build-<%= dependency %> ]
            version: every
            trigger: true
        - task: update-dependency-in-manifests
          file: buildpacks-ci/tasks/update-dependency-in-buildpack.yml
          params:
            <%= "BUILDPACK_NAME: #{buildpack}" if ["node", "nginx"].include? dependency %>
            DEPENDENCY: <%= dependency %>
            TRACKER_PROJECT_ID: {{cf-buildpacks-public-tracker-id}}
            TRACKER_API_TOKEN: {{pivotal-tracker-api-token}}
            TRACKER_REQUESTER_ID: {{cf-buildpacks-requester-id}}
            BUILDPACK_DEPENDENCIES_HOST_DOMAIN: {{buildpack-dependencies-host-domain}}
        - put: cf-environments
          resource: cf-edge-environments
          params:
            acquire: true
        - do:
          - task: rspec
            file: buildpacks-ci/tasks/test-buildpack-before-auto-update.yml
            privileged: true
            params:
              STACKS: cflinuxfs2
              COMPOSER_GITHUB_OAUTH_TOKEN: {{composer-github-oauth-token}}
              CF_PASSWORD: {{<PASSWORD>}}
          - put: <%= buildpack %>-buildpack
            params:
              repository: buildpack-artifacts
              rebase: true
          ensure:
            put: cf-edge-environments
            params:
              release: cf-environments
        on_failure:
          put: failure-alert
          params:
            text: "update-<%= dependency %>-in-<%= buildpack %>-buildpack job on Concourse failed! \n Check: https://buildpacks.ci.cf-app.com/pipelines/binary-builder/jobs/update-<%= dependency %>-in-<%= buildpack %>-buildpack"
            channel: {{concourse-job-failure-notifications-slack-channel}}
            username: concourse
            icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
  <% end %>
<% end %><commit_msg>use concourse built-in variable in slack notifications for binary-builder pipeline<commit_after>resource_types:
  - name: concourse2tracker
    type: docker-image
    source:
      repository: cfbuildpacks/concourse2tracker
  - name: slack-notification
    type: docker-image
    source:
      repository: cfcommunity/slack-notification-resource
resources:
  - name: binary-builder
    type: git
    source:
      uri: {{binary-builder-git-uri}}
  - name: buildpacks-ci
    type: git
    source:
      uri: {{buildpacks-ci-git-uri-public}}
  - name: builds-out
    type: git
    source:
      branch: binary-builds
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
  - name: build-tar
    type: s3
    source:
      bucket: {{buildpacks-binaries-s3-bucket}}
      versioned_file: /concourse-artifacts/binary-builder-source.tgz
      access_key_id: {{pivotal-buildpacks-s3-access-key}}
      secret_access_key: {{pivotal-buildpacks-s3-secret-key}}
  - name: concourse2tracker
    type: concourse2tracker
  - name: failure-alert
    type: slack-notification
    source:
      url: {{concourse-job-failure-notifications-slack-webhook}}
  - name: cf-edge-environments
    type: pool
    source:
      branch: resource-pools
      pool: cf-edge-environments
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
<% %w(go bundler composer glide godep httpd jruby php php7 python node nginx ruby).each do |dep| %>
  - name: <%= dep %>-builds
    type: git
    source:
      branch: binary-builds
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
      paths: [ <%= dep %>-builds.yml ]
  - name: <%= dep %>-built-output
    type: git
    source:
      branch: binary-built-output
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
      paths: [ <%= dep %>-built.yml ]
<% end %>

<% %w(composer glide godep nginx node).each do |auto_dep| %>
  - name: <%= auto_dep %>-builds-in
    type: git
    source:
      branch: binary-builds
      private_key: {{buildpacks-ci-private-key}}
      uri: {{buildpacks-ci-git-uri}}
      paths: [ <%= auto_dep %>-builds.yml ]
<% end %>

<% %w(composer glide godep).each do |auto_old| %>
  - name: <%= auto_old %>-new-releases
    type: git
    source:
      uri: {{buildpacks-ci-git-uri}}
      branch: new-release-notifications
      private_key: {{buildpacks-ci-private-key}}
      paths: [ <%= auto_old %>.yaml ]
<% end %>

<% %w(nginx node).each do |auto_new| %>
  - name: <%= auto_new %>-new-releases
    type: git
    source:
      uri: {{buildpacks-ci-git-uri}}
      branch: new-release-notifications
      private_key: {{buildpacks-ci-private-key}}
      paths: [ <%= auto_new %>-new.yaml ]
<% end %>

<% %w(go nodejs ruby php staticfile).each do |language| %>
  - name: <%= language %>-buildpack
    type: git
    source:
      uri: <EMAIL>:<%= organization %>/<%= language %>-buildpack.git
      private_key: {{<%= language %>-buildpack-private-key}}
      branch: develop
      ignore_paths:
        - VERSION
        - CHANGELOG
<% end %>

groups:
  - name: enqueue-automated-builds
    jobs:
<% %w(composer glide godep nginx node).each do |auto_dep| %>
    - trigger-<%= auto_dep %>-build
<% end %>
  - name: automated-builds
    jobs:
<% %w(composer glide godep nginx node).each do |auto_dep| %>
    - build-<%= auto_dep %>
<% end %>
<% {go: ["godep", "glide"], staticfile: ["nginx"], php: ["nginx", "composer"], nodejs: ["node"], ruby: ["node"]}.each do |buildpack, dependencies| %>
  <% dependencies.each do |dependency| %>
    - update-<%= dependency %>-in-<%= buildpack %>-buildpack
  <% end %>
<% end %>
    - test-node
    - test-nginx
  - name: manual-builds
    jobs:
<% %w(go php php7 ruby jruby bundler python httpd).each do |dependency| %>
    - build-<%= dependency %>
<% end %>
    - test-php
    - test-php7
    - test-python
    - test-jruby
    - test-ruby
  - name: binary-builder
    jobs:
      - binary-builder


jobs:
  - name: binary-builder
    serial: true
    plan:
      - aggregate:
        - get: buildpacks-ci
        - get: binary-builder
          trigger: true
      - do:
        - aggregate:
          - task: rspec-1
            file: buildpacks-ci/tasks/binary-builder.yml
            params: { TOTAL_GROUPS: 4, CURRENT_GROUP: 1, RUBYGEM_MIRROR: {{rubygem-mirror}} }
            privileged: true
          - task: rspec-2
            file: buildpacks-ci/tasks/binary-builder.yml
            params: { TOTAL_GROUPS: 4, CURRENT_GROUP: 2, RUBYGEM_MIRROR: {{rubygem-mirror}} }
            privileged: true
          - task: rspec-3
            file: buildpacks-ci/tasks/binary-builder.yml
            params: { TOTAL_GROUPS: 4, CURRENT_GROUP: 3, RUBYGEM_MIRROR: {{rubygem-mirror}}  }
            privileged: true
          - task: rspec-4
            file: buildpacks-ci/tasks/binary-builder.yml
            params: { TOTAL_GROUPS: 4, CURRENT_GROUP: 4, RUBYGEM_MIRROR: {{rubygem-mirror}} }
            privileged: true
        on_failure:
          put: failure-alert
          params:
            text: "binary-builder binary-builder job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME"
            channel: {{concourse-job-failure-notifications-slack-channel}}
            username: concourse
            icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% %w(go php php7 ruby jruby bundler python httpd).each do |dependency| %>
  - name: build-<%= dependency %>
    serial: true
    plan:
      - aggregate:
        - get: builds-yaml
          resource: <%= dependency %>-builds
          trigger: true
        - get: binary-builder
          passed: [binary-builder]
        - get: buildpacks-ci
        - get: built-yaml
          resource: <%= dependency %>-built-output
      - do:
        - task: build-binary
          file: buildpacks-ci/tasks/build-binary.yml
          params:
            BINARY_NAME: <%= dependency %>
            GIT_SSH_KEY: {{buildpacks-ci-private-key}}
          privileged: true
        - put: build-tar
          params:
            file: binary-builder-artifacts/final-artifact/*
        - task: push-binary
          file: buildpacks-ci/tasks/push-binary.yml
          params:
            BINARY_NAME: <%= dependency %>
            BUCKET_NAME: {{buildpacks-binaries-s3-bucket}}
            AWS_ACCESS_KEY_ID: {{pivotal-buildpacks-s3-access-key}}
            AWS_SECRET_ACCESS_KEY: {{pivotal-buildpacks-s3-secret-key}}
            AWS_DEFAULT_REGION: us-east-1
          privileged: true
        - put: builds-out
          params:
            repository: builds-yaml-artifacts
            rebase: true
        - put: concourse2tracker
          params:
            api_token: {{pivotal-tracker-api-token}}
            git_path: builds-yaml
            project_id: {{cf-buildpacks-public-tracker-id}}
        on_failure:
          put: failure-alert
          params:
            text: "binary-builder build-<%= dependency %> job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME"
            channel: {{concourse-job-failure-notifications-slack-channel}}
            username: concourse
            icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% end %>
  - name: test-php
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-php ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-php.yml
  - name: test-jruby
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-jruby ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-jruby.yml
  - name: test-python
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-python ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-python.yml
  - name: test-ruby
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-ruby ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-ruby.yml
  - name: test-node
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-node ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-node.yml
  - name: test-php7
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-php7 ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-php7.yml
  - name: test-nginx
    serial: true
    plan:
      - aggregate:
        - get: build-tar
          passed: [ build-nginx ]
          trigger: true
        - get: buildpacks-ci
      - task: run tests
        file: buildpacks-ci/tasks/run-unit-tests-for-nginx.yml
<% %w(godep composer glide nginx node).each do |dependency| %>
  - name: trigger-<%= dependency %>-build
    serial: true
    plan:
      - aggregate:
        - get: buildpacks-ci
        - get: new-releases
          resource: <%= dependency %>-new-releases
          trigger: true
        - get: binary-builds
          resource: <%= dependency %>-builds
      - task: queue-binary-build
        file: buildpacks-ci/tasks/queue-dependency-build.yml
        params:
          DEPENDENCY: <%= dependency %>
      - put: <%= dependency %>-builds
        params:
          repository: binary-builds-artifacts
          rebase: true
  - name: build-<%= dependency %>
    serial: true
    plan:
      - aggregate:
        - get: built-yaml
          resource: <%= dependency %>-built-output
        - get: builds-yaml
          resource: <%= dependency %>-builds-in
          version: every
          trigger: true
        - get: binary-builder
          passed: [binary-builder]
        - get: buildpacks-ci
      - do:
        - task: build-binary
          file: buildpacks-ci/tasks/build-binary.yml
          params:
            GIT_SSH_KEY: {{buildpacks-ci-private-key}}
            BINARY_NAME: <%= dependency %>
          privileged: true
        - put: build-tar
          params:
            file: binary-builder-artifacts/final-artifact/*
        - task: push-binary
          file: buildpacks-ci/tasks/push-binary.yml
          params:
            BINARY_NAME: <%= dependency %>
            BUCKET_NAME: {{buildpacks-binaries-s3-bucket}}
            AWS_ACCESS_KEY_ID: {{pivotal-buildpacks-s3-access-key}}
            AWS_SECRET_ACCESS_KEY: {{pivotal-buildpacks-s3-secret-key}}
            AWS_DEFAULT_REGION: us-east-1
          privileged: true
        - put: builds-out
          resource: <%= dependency %>-built-output
          params:
            repository: builds-yaml-artifacts
            rebase: true
        - put: concourse2tracker
          params:
            api_token: {{pivotal-tracker-api-token}}
            git_path: builds-yaml
            project_id: {{cf-buildpacks-public-tracker-id}}
        on_failure:
          put: failure-alert
          params:
            text: "binary-builder build-<%= dependency %> job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME"
            channel: {{concourse-job-failure-notifications-slack-channel}}
            username: concourse
            icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% end %>
<% {go: ["godep", "glide"], staticfile: ["nginx"], php: ["nginx", "composer"], nodejs: ["node"], ruby: ["node"]}.each do |buildpack, dependencies| %>
  <% dependencies.each do |dependency| %>
  - name: update-<%= dependency %>-in-<%= buildpack %>-buildpack
    serial: true
    plan:
      - do:
        - aggregate:
          - get: buildpacks-ci
          - get: buildpack
            resource: <%= buildpack %>-buildpack
          - get: built-out
            resource: <%= dependency %>-built-output
            passed: [ build-<%= dependency %> ]
            version: every
            trigger: true
        - task: update-dependency-in-manifests
          file: buildpacks-ci/tasks/update-dependency-in-buildpack.yml
          params:
            <%= "BUILDPACK_NAME: #{buildpack}" if ["node", "nginx"].include? dependency %>
            DEPENDENCY: <%= dependency %>
            TRACKER_PROJECT_ID: {{cf-buildpacks-public-tracker-id}}
            TRACKER_API_TOKEN: {{pivotal-tracker-api-token}}
            TRACKER_REQUESTER_ID: {{cf-buildpacks-requester-id}}
            BUILDPACK_DEPENDENCIES_HOST_DOMAIN: {{buildpack-dependencies-host-domain}}
        - put: cf-environments
          resource: cf-edge-environments
          params:
            acquire: true
        - do:
          - task: rspec
            file: buildpacks-ci/tasks/test-buildpack-before-auto-update.yml
            privileged: true
            params:
              STACKS: cflinuxfs2
              COMPOSER_GITHUB_OAUTH_TOKEN: {{composer-github-oauth-token}}
              CF_PASSWORD: {{<PASSWORD>}}
          - put: <%= buildpack %>-buildpack
            params:
              repository: buildpack-artifacts
              rebase: true
          ensure:
            put: cf-edge-environments
            params:
              release: cf-environments
        on_failure:
          put: failure-alert
          params:
            text: "update-<%= dependency %>-in-<%= buildpack %>-buildpack job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME"
            channel: {{concourse-job-failure-notifications-slack-channel}}
            username: concourse
            icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
  <% end %>
<% end %>
{'fraction_non_alphanumeric': 0.13051052332195676, 'fraction_numerical': 0.004408418657565415, 'mean_word_length': 1.9879966008073082, 'pattern_counts': {'":': 0, '<': 160, '<?xml version=': 0, '>': 160, 'https://': 4, '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': '4911169', 'n_tokens_mistral': 9478, 'n_tokens_neox': 8938, 'n_words': 1809}