<commit_before>---
resource_types:
  - name: slack-notification
    type: docker-image
    source:
      repository: cfcommunity/slack-notification-resource
  - name: cron
    type: docker-image
    source:
      repository: cfbuildpacks/cron-resource
  - name: bosh-deployment
    type: docker-image
    source:
      repository: cloudfoundry/bosh-deployment-resource
resources:
  - name: bosh-deployment
    type: git
    source:
      uri: https://github.com/cloudfoundry/bosh-deployment
      branch: master
  #TODO: Delete these resources when cf-deployment has cflinuxfs3
<% %w(dotnet-core go ruby binary staticfile nodejs php python java).each do |language| %>
  - name: <%= language %>-buildpack-bosh-release
    type: git
    source:
      uri: <EMAIL>:cloudfoundry/<%= language %>-buildpack-release.git
      private_key: {{<%= language %>-buildpack-bosh-release-private-key}}
      branch: master
<% end %>
  # TODO: Delete to here

  - name: daily-3am-trigger
    type: cron
    source:
      expression: 0 3 * * *
      location: {{current-timezone}}

  - name: sunday-9pm-trigger
    type: cron
    source:
      expression: 0 21 * * 7
      location: {{current-timezone}}

  - name: buildpacks-ci
    type: git
    source:
      uri: {{buildpacks-ci-git-uri-public}}
      branch: {{buildpacks-ci-git-uri-public-branch}}

  - name: cf-deployment
    type: git
    source:
      uri: https://github.com/cloudfoundry/cf-deployment
      branch: master

  - name: bbl-state
    type: git
    source:
      uri: <EMAIL>:cloudfoundry/buildpacks-envs
      branch: master
      private_key: {{buildpacks-envs-private-key}}

  - name: cflinuxfs3-bosh-release
    type: github-release
    source:
      user: cloudfoundry
      repository: cflinuxfs3-release
      access_token: {{buildpacks-github-token}}

  - name: edge-cf-deployment
    type: bosh-deployment
    source:
      deployment: cf
      vars_store:
        provider: gcs
        config:
          bucket: edge-cf-deployment
          file_name: vars-store.yml
          json_key: {{edge-cf-deployment-gcs-service-account-key}}

  - name: gcp-stemcell
    type: bosh-io-stemcell
    source:
      name: bosh-google-kvm-ubuntu-trusty-go_agent

  - name: windows2012-stemcell
    type: bosh-io-stemcell
    source:
      name: bosh-google-kvm-windows2012R2-go_agent

  - name: windows2016-stemcell
    type: bosh-io-stemcell
    source:
      name: bosh-google-kvm-windows2016-go_agent

  - name: failure-alert
    type: slack-notification
    source:
      url: {{concourse-job-failure-notifications-slack-webhook}}

jobs:
  - name: deploy-edge
    serial_groups:
      - edge
    serial: true
    public: true
    plan:
      - do:
        - aggregate:
          - get: daily-3am-trigger
            trigger: true
          - get: buildpacks-ci
          - get: cf-deployment
          - get: bbl-state
          - get: windows2012-stemcell
          - get: windows2016-stemcell
          - get: gcp-stemcell
          # TODO: Remove these releases when cf-deployment has cflinuxfs3
          - get: cflinuxfs3-bosh-release
          - get: java-buildpack-bosh-release
          - get: go-buildpack-bosh-release
          - get: python-buildpack-bosh-release
          - get: nodejs-buildpack-bosh-release
          - get: ruby-buildpack-bosh-release
          - get: php-buildpack-bosh-release
          - get: staticfile-buildpack-bosh-release
          - get: binary-buildpack-bosh-release
          - get: dotnet-core-buildpack-bosh-release
          - get: bosh-deployment
        - aggregate:
          - task: create-deployment-source-config
            file: buildpacks-ci/tasks/create-deployment-source-config/task.yml
            params:
              ENV_NAME: edge
          - task: turn-on-bosh-dns
            file: buildpacks-ci/tasks/turn-on-bosh-dns/task.yml
            params:
              BBL_STATE_DIR: edge
          - task: create-all-cflinuxfs3-bosh-releases-temporary
            file: buildpacks-ci/tasks/create-all-cflinuxfs3-bosh-releases-temporary/task.yml
        - put: edge-cf-deployment
          params:
            source_file: deployment-source-config/source_file.yml
            manifest: cf-deployment/cf-deployment.yml
            releases:
              - cflinuxfs3-bosh-release/*.tgz
              - built-buildpacks-artifacts/*.tgz
            stemcells:
              - gcp-stemcell/*.tgz
              - windows2012-stemcell/*.tgz
              - windows2016-stemcell/*.tgz
            ops_files:
            - cf-deployment/operations/windows-cell.yml
            - cf-deployment/operations/windows2016-cell.yml
            - cf-deployment/operations/use-latest-windows-stemcell.yml
            - cf-deployment/operations/use-latest-windows2016-stemcell.yml
            - cf-deployment/operations/experimental/secure-service-credentials.yml
            - cf-deployment/operations/experimental/secure-service-credentials-windows-cell.yml
            - cf-deployment/operations/experimental/secure-service-credentials-windows2016-cell.yml
            - cf-deployment/operations/experimental/enable-traffic-to-internal-networks.yml
            - cf-deployment/operations/experimental/disable-interpolate-service-bindings.yml
            - buildpacks-ci/deployments/operations/no-canaries.yml
            - buildpacks-ci/deployments/edge-shared/num-cells.yml
            - buildpacks-ci/deployments/edge-shared/scale-instance-groups.yml
            - buildpacks-ci/deployments/operations/cflinuxfs3.yml
            - buildpacks-ci/deployments/operations/add-cflinuxfs3-buildpacks.yml
            - buildpacks-ci/deployments/operations/add-windows-binary-buildpacks.yml
            - buildpacks-opsfile/opsfile.yml
            vars:
              system_domain: edge.buildpacks-gcp.ci.cf-app.com
        on_failure:
          put: failure-alert
          params:
            text: "$BUILD_PIPELINE_NAME $BUILD_JOB_NAME job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/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

  - name: clean-up-edge
    serial_groups:
      - edge
    serial: true
    public: true<commit_msg>Use latest stemcell in edge environment<commit_after>---
resource_types:
  - name: slack-notification
    type: docker-image
    source:
      repository: cfcommunity/slack-notification-resource
  - name: cron
    type: docker-image
    source:
      repository: cfbuildpacks/cron-resource
  - name: bosh-deployment
    type: docker-image
    source:
      repository: cloudfoundry/bosh-deployment-resource
resources:
  - name: bosh-deployment
    type: git
    source:
      uri: https://github.com/cloudfoundry/bosh-deployment
      branch: master
  #TODO: Delete these resources when cf-deployment has cflinuxfs3
<% %w(dotnet-core go ruby binary staticfile nodejs php python java).each do |language| %>
  - name: <%= language %>-buildpack-bosh-release
    type: git
    source:
      uri: <EMAIL>:cloudfoundry/<%= language %>-buildpack-release.git
      private_key: {{<%= language %>-buildpack-bosh-release-private-key}}
      branch: master
<% end %>
  # TODO: Delete to here

  - name: daily-3am-trigger
    type: cron
    source:
      expression: 0 3 * * *
      location: {{current-timezone}}

  - name: sunday-9pm-trigger
    type: cron
    source:
      expression: 0 21 * * 7
      location: {{current-timezone}}

  - name: buildpacks-ci
    type: git
    source:
      uri: {{buildpacks-ci-git-uri-public}}
      branch: {{buildpacks-ci-git-uri-public-branch}}

  - name: cf-deployment
    type: git
    source:
      uri: https://github.com/cloudfoundry/cf-deployment
      branch: master

  - name: bbl-state
    type: git
    source:
      uri: <EMAIL>:cloudfoundry/buildpacks-envs
      branch: master
      private_key: {{buildpacks-envs-private-key}}

  - name: cflinuxfs3-bosh-release
    type: github-release
    source:
      user: cloudfoundry
      repository: cflinuxfs3-release
      access_token: {{buildpacks-github-token}}

  - name: edge-cf-deployment
    type: bosh-deployment
    source:
      deployment: cf
      vars_store:
        provider: gcs
        config:
          bucket: edge-cf-deployment
          file_name: vars-store.yml
          json_key: {{edge-cf-deployment-gcs-service-account-key}}

  - name: gcp-stemcell
    type: bosh-io-stemcell
    source:
      name: bosh-google-kvm-ubuntu-trusty-go_agent

  - name: windows2012-stemcell
    type: bosh-io-stemcell
    source:
      name: bosh-google-kvm-windows2012R2-go_agent

  - name: windows2016-stemcell
    type: bosh-io-stemcell
    source:
      name: bosh-google-kvm-windows2016-go_agent

  - name: failure-alert
    type: slack-notification
    source:
      url: {{concourse-job-failure-notifications-slack-webhook}}

jobs:
  - name: deploy-edge
    serial_groups:
      - edge
    serial: true
    public: true
    plan:
      - do:
        - aggregate:
          - get: daily-3am-trigger
            trigger: true
          - get: buildpacks-ci
          - get: cf-deployment
          - get: bbl-state
          - get: windows2012-stemcell
          - get: windows2016-stemcell
          - get: gcp-stemcell
          # TODO: Remove these releases when cf-deployment has cflinuxfs3
          - get: cflinuxfs3-bosh-release
          - get: java-buildpack-bosh-release
          - get: go-buildpack-bosh-release
          - get: python-buildpack-bosh-release
          - get: nodejs-buildpack-bosh-release
          - get: ruby-buildpack-bosh-release
          - get: php-buildpack-bosh-release
          - get: staticfile-buildpack-bosh-release
          - get: binary-buildpack-bosh-release
          - get: dotnet-core-buildpack-bosh-release
          - get: bosh-deployment
        - aggregate:
          - task: create-deployment-source-config
            file: buildpacks-ci/tasks/create-deployment-source-config/task.yml
            params:
              ENV_NAME: edge
          - task: turn-on-bosh-dns
            file: buildpacks-ci/tasks/turn-on-bosh-dns/task.yml
            params:
              BBL_STATE_DIR: edge
          - task: create-all-cflinuxfs3-bosh-releases-temporary
            file: buildpacks-ci/tasks/create-all-cflinuxfs3-bosh-releases-temporary/task.yml
        - put: edge-cf-deployment
          params:
            source_file: deployment-source-config/source_file.yml
            manifest: cf-deployment/cf-deployment.yml
            releases:
              - cflinuxfs3-bosh-release/*.tgz
              - built-buildpacks-artifacts/*.tgz
            stemcells:
              - gcp-stemcell/*.tgz
              - windows2012-stemcell/*.tgz
              - windows2016-stemcell/*.tgz
            ops_files:
            - cf-deployment/operations/windows-cell.yml
            - cf-deployment/operations/windows2016-cell.yml
            - cf-deployment/operations/use-latest-stemcell.yml
            - cf-deployment/operations/use-latest-windows-stemcell.yml
            - cf-deployment/operations/use-latest-windows2016-stemcell.yml
            - cf-deployment/operations/experimental/secure-service-credentials.yml
            - cf-deployment/operations/experimental/secure-service-credentials-windows-cell.yml
            - cf-deployment/operations/experimental/secure-service-credentials-windows2016-cell.yml
            - cf-deployment/operations/experimental/enable-traffic-to-internal-networks.yml
            - cf-deployment/operations/experimental/disable-interpolate-service-bindings.yml
            - buildpacks-ci/deployments/operations/no-canaries.yml
            - buildpacks-ci/deployments/edge-shared/num-cells.yml
            - buildpacks-ci/deployments/edge-shared/scale-instance-groups.yml
            - buildpacks-ci/deployments/operations/cflinuxfs3.yml
            - buildpacks-ci/deployments/operations/add-cflinuxfs3-buildpacks.yml
            - buildpacks-ci/deployments/operations/add-windows-binary-buildpacks.yml
            - buildpacks-opsfile/opsfile.yml
            vars:
              system_domain: edge.buildpacks-gcp.ci.cf-app.com
        on_failure:
          put: failure-alert
          params:
            text: "$BUILD_PIPELINE_NAME $BUILD_JOB_NAME job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/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

  - name: clean-up-edge
    serial_groups:
      - edge
    serial: true
    public: true
{'fraction_non_alphanumeric': 0.1059080621244049, 'fraction_numerical': 0.010926402872083041, 'mean_word_length': 2.118520321246045, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 4, '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': '484495', 'n_tokens_mistral': 4285, 'n_tokens_neox': 3986, 'n_words': 639}