<commit_before>jobs:
- name: buildroot-tarmaker
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-tarmaker
      trigger: true
    - get: ubuntu-16.04
      params: {save: true}
      trigger: true
  - put: buildroot-tarmaker-image
    params:
      build: buildroot-tarmaker
      dockerfile: buildroot-tarmaker/Dockerfile.tarmaker
      load_base: ubuntu-16.04

- name: buildroot-base
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-base
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: base
  - put: buildroot-base-image
    params: {build: image-root}

- name: buildroot-git
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-git
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: git
  - put: buildroot-git-image
    params: {build: image-root}

- name: buildroot-curl
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-curl
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: curl
  - put: buildroot-curl-image
    params: {build: image-root}

- name: buildroot-hg
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-hg
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: hg
  - put: buildroot-hg-image
    params: {build: image-root}

- name: buildroot-ruby
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-ruby
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: ruby
  - put: buildroot-ruby-image
    params: {build: image-root}

- name: buildroot-iptables
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-iptables
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: iptables
  - put: buildroot-iptables-image
    params: {build: image-root}

- name: git-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: git-resource
      trigger: true
    - get: buildroot-git-image
      params: {save: true}
      passed: [buildroot-git]
      trigger: true
  - put: git-resource-image
    params:
      load_base: buildroot-git-image
      build: git-resource
  - task: integration
    image: git-resource-image
    file: git-resource/ci/tests.yml

- name: bump-git-resource
  serial: true
  public: true
  plan:
  - get: git-resource-image
    passed: [git-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: git-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: git-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: hg-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: hg-resource
      trigger: true
    - get: buildroot-hg-image
      params: {save: true}
      passed: [buildroot-hg]
      trigger: true
  - task: unit
    file: hg-resource/ci/unit.yml
  - task: build
    file: hg-resource/ci/build.yml
  - put: hg-resource-image
    params:
      load_base: buildroot-hg-image
      build: built-resource
  - task: integration
    image: hg-resource-image
    file: hg-resource/ci/integration.yml

- name: bump-hg-resource
  serial: true
  public: true
  plan:
  - get: hg-resource-image
    passed: [hg-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: hg-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: hg-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: pool-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: pool-resource
      trigger: true
    - get: buildroot-git-image
      params: {save: true}
      passed: [buildroot-git]
      trigger: true
  - task: unit
    file: pool-resource/build.yml
  - put: pool-resource-image
    params:
      load_base: buildroot-git-image
      build: built-resource

- name: bump-pool-resource
  serial: true
  public: true
  plan:
  - get: pool-resource-image
    passed: [pool-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: pool-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: pool-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: docker-image-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: docker-image-resource
      trigger: true
    - get: buildroot-iptables-image
      params: {save: true}
      passed: [buildroot-iptables]
      trigger: true
  - task: build-resource
    file: docker-image-resource/ci/build.yml
  - put: docker-image-resource-image
    params:
      load_base: buildroot-iptables-image
      build: built-resource

- name: bump-docker-image-resource
  serial: true
  public: true
  plan:
  - get: docker-image-resource-image
    passed: [docker-image-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: docker-image-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: docker-image-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: time-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-base-image
      params: {save: true}
      passed: [buildroot-base]
      trigger: true
    - get: time-resource
      trigger: true
  - task: unit-and-build
    file: time-resource/build.yml
  - put: time-resource-image
    params:
      load_base: buildroot-base-image
      build: built-resource

- name: bump-time-resource
  serial: true
  public: true
  plan:
  - get: time-resource-image
    passed: [time-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: time-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: time-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: archive-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-curl-image
      params: {save: true}
      passed: [buildroot-curl]
      trigger: true
    - get: archive-resource
      trigger: true
  - task: build
    file: archive-resource/build.yml
  - put: archive-resource-image
    params:
      load_base: buildroot-curl-image
      build: built-resource

- name: bump-archive-resource
  serial: true
  public: true
  plan:
  - get: archive-resource-image
    passed: [archive-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: archive-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: archive-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: bosh-deployment-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-ruby-image
      params: {save: true}
      passed: [buildroot-ruby]
      trigger: true
    - get: bosh-deployment-resource
      trigger: true
  - task: unit
    file: bosh-deployment-resource/build.yml
  - put: bosh-deployment-resource-image
    params:
      load_base: buildroot-ruby-image
      build: bosh-deployment-resource

- name: bump-bosh-deployment-resource
  serial: true
  public: true
  plan:
  - get: bosh-deployment-resource-image
    passed: [bosh-deployment-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: bosh-deployment-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: bosh-deployment-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: s3-resource
  serial: true
  plan:
  - aggregate:
    - get: buildroot-base-image
      params: {save: true}
      passed: [buildroot-base]
      trigger: true
    - get: s3-resource
      trigger: true
  - task: unit
    file: s3-resource/build.yml
    params:
      S3_TESTING_ACCESS_KEY_ID:  {{s3-resource-access-key}}
      S3_TESTING_SECRET_ACCESS_KEY: {{s3-resource-secret-key}}
      S3_TESTING_BUCKET: {{s3-resource-bucket}}
      S3_VERSIONED_TESTING_BUCKET: {{s3-resource-versioned-bucket}}
      S3_TESTING_REGION: {{s3-resource-region}}
  - put: s3-resource-image
    params:
      load_base: buildroot-base-image
      build: built-resource

- name: bump-s3-resource
  serial: true
  plan:
  - get: s3-resource-image
    passed: [s3-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: s3-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: s3-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: github-release-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-base-image
      params: {save: true}
      passed: [buildroot-base]
      trigger: true
    - get: github-release-resource
      trigger: true
  - task: unit-and-build
    file: github-release-resource/build.yml
  - put: github-release-resource-image
    params:
      load_base: buildroot-base-image
      build: built-resource

- name: bump-github-release-resource
  serial: true
  public: true
  plan:
  - get: github-release-resource-image
    passed: [github-release-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: github-release-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: github-release-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: cf-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-base-image
      params: {save: true}
      passed: [buildroot-base]
      trigger: true
    - get: cf-resource
      trigger: true
    - get: cf-cli
      trigger: true
    - get: autopilot
      trigger: true
  - aggregate:
    - task: autopilot-unit
      file: autopilot/build.yml
    - task: resource-unit
      file: cf-resource/build.yml
  - put: cf-resource-image
    params:
      load_base: buildroot-base-image
      build: built-resource

- name: bump-cf-resource
  serial: true
  public: true
  plan:
  - get: cf-resource-image
    passed: [cf-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: cf-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: cf-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: semver-resource
  serial: true
  public: false # easy to leak bucket params
  plan:
  - aggregate:
    - get: buildroot-git-image
      params: {save: true}
      passed: [buildroot-git]
      trigger: true
    - get: semver-resource
      trigger: true
  - task: unit
    file: semver-resource/build.yml
    params:
      SEMVER_TESTING_ACCESS_KEY_ID: {{semver-access-key}}
      SEMVER_TESTING_SECRET_ACCESS_KEY: {{semver-secret-key}}
      SEMVER_TESTING_BUCKET: {{semver-bucket}}
      SEMVER_TESTING_REGION: {{semver-region}}
  - put: semver-resource-image
    params:
      load_base: buildroot-git-image
      build: built-resource

- name: bump-semver-resource
  serial: true
  public: false # easy to leak bucket params
  plan:
  - get: semver-resource-image
    passed: [semver-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: semver-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: semver-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: bosh-io-release-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-curl-image
      params: {save: true}
      passed: [buildroot-curl]
      trigger: true
    - get: bosh-io-release-resource
      trigger: true
  - put: bosh-io-release-resource-image
    params:
      load_base: buildroot-curl-image
      build: bosh-io-release-resource

- name: bump-bosh-io-release-resource
  serial: true
  public: true
  plan:
  - get: bosh-io-release-resource-image
    passed: [bosh-io-release-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: bosh-io-release-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: bosh-io-release-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: bosh-io-stemcell-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-curl-image
      params: {save: true}
      passed: [buildroot-curl]
      trigger: true
    - get: bosh-io-stemcell-resource
      trigger: true
  - task: unit
    file: bosh-io-stemcell-resource/build.yml
  - put: bosh-io-stemcell-resource-image
    params:
      load_base: buildroot-curl-image
      build: bosh-io-stemcell-resource

- name: bump-bosh-io-stemcell-resource
  serial: true
  public: true
  plan:
  - get: bosh-io-stemcell-resource-image
    passed: [bosh-io-stemcell-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: bosh-io-stemcell-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: bosh-io-stemcell-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: tracker-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-git-image
      params: {save: true}
      passed: [buildroot-git]
      trigger: true
    - get: tracker-resource
      trigger: true
  - task: unit
    file: tracker-resource/build.yml
    params:
      TRACKER_TOKEN: {{tracker-testing-token}}
  - put: tracker-resource-image
    params:
      load_base: buildroot-git-image
      build: built-resource

- name: bump-tracker-resource
  serial: true
  public: true
  plan:
  - get: tracker-resource-image
    passed: [tracker-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: tracker-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: tracker-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: vagrant-cloud-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-curl-image
      params: {save: true}
      passed: [buildroot-curl]
      trigger: true
    - get: vagrant-cloud-resource
      trigger: true
  - put: vagrant-cloud-resource-image
    params:
      load_base: buildroot-curl-image
      build: vagrant-cloud-resource

- name: bump-vagrant-cloud-resource
  serial: true
  public: true
  plan:
  - get: vagrant-cloud-resource-image
    passed: [vagrant-cloud-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: vagrant-cloud-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: vagrant-cloud-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

resources:
- name: git-resource
  type: git
  source:
    uri: https://github.com/concourse/git-resource.git
    branch: master

- name: hg-resource
  type: git
  source:
    uri: https://github.com/concourse/hg-resource.git
    branch: master

- name: pool-resource
  type: git
  source:
    uri: https://github.com/concourse/pool-resource.git
    branch: master

- name: docker-image-resource
  type: git
  source:
    uri: https://github.com/concourse/docker-image-resource.git
    branch: master

- name: time-resource
  type: git
  source:
    uri: https://github.com/concourse/time-resource.git
    branch: master

- name: tracker-resource
  type: git
  source:
    uri: https://github.com/concourse/tracker-resource.git
    branch: master

- name: vagrant-cloud-resource
  type: git
  source:
    uri: https://github.com/concourse/vagrant-cloud-resource.git
    branch: master

- name: cf-resource
  type: git
  source:
    uri: https://github.com/concourse/cf-resource.git
    branch: master

- name: s3-resource
  type: git
  source:
    uri: https://github.com/concourse/s3-resource.git
    branch: master

- name: github-release-resource
  type: git
  source:
    uri: https://github.com/concourse/github-release-resource.git
    branch: master

- name: semver-resource
  type: git
  source:
    uri: https://github.com/concourse/semver-resource.git
    branch: master

- name: archive-resource
  type: git
  source:
    uri: https://github.com/concourse/archive-resource.git
    branch: master

- name: bosh-deployment-resource
  type: git
  source:
    uri: https://github.com/concourse/bosh-deployment-resource.git
    branch: master

- name: bosh-io-release-resource
  type: git
  source:
    uri: https://github.com/concourse/bosh-io-release-resource.git
    branch: master
    ignore_paths: [README.md]

- name: bosh-io-stemcell-resource
  type: git
  source:
    uri: https://github.com/concourse/bosh-io-stemcell-resource.git
    branch: master
    ignore_paths: [README.md]

- name: git-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/git-resource

- name: hg-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/hg-resource

- name: pool-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/pool-resource

- name: docker-image-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/docker-image-resource

- name: archive-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/archive-resource

- name: bosh-deployment-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/bosh-deployment-resource

- name: time-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/time-resource

- name: tracker-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/tracker-resource

- name: vagrant-cloud-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/vagrant-cloud-resource

- name: cf-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/cf-resource

- name: s3-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/s3-resource

- name: github-release-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/github-release-resource

- name: semver-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/semver-resource

- name: bosh-io-release-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/bosh-io-release-resource

- name: bosh-io-stemcell-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/bosh-io-stemcell-resource

- name: autopilot
  type: git
  source:
    uri: https://github.com/concourse/autopilot.git
    branch: master

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

- name: concourse
  type: git
  source:
    uri: <EMAIL>:concourse/concourse.git
    branch: develop
    private_key: {{concourse-repo-private-key}}

- name: buildroot
  type: git
  source:
    uri: git://git.buildroot.net/buildroot
    tag_filter: '[0-9][0-9][0-9][0-9].[0-9][0-9]'

- name: buildroot-tarmaker
  type: git
  source:
    uri: https://github.com/concourse/buildroot-images.git<commit_msg>use master of buildroot for git 2.8.3<commit_after>jobs:
- name: buildroot-tarmaker
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-tarmaker
      trigger: true
    - get: ubuntu-16.04
      params: {save: true}
      trigger: true
  - put: buildroot-tarmaker-image
    params:
      build: buildroot-tarmaker
      dockerfile: buildroot-tarmaker/Dockerfile.tarmaker
      load_base: ubuntu-16.04

- name: buildroot-base
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-base
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: base
  - put: buildroot-base-image
    params: {build: image-root}

- name: buildroot-git
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-git
      trigger: true
    - get: buildroot
      resource: buildroot-edge
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: git
  - put: buildroot-git-image
    params: {build: image-root}

- name: buildroot-curl
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-curl
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: curl
  - put: buildroot-curl-image
    params: {build: image-root}

- name: buildroot-hg
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-hg
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: hg
  - put: buildroot-hg-image
    params: {build: image-root}

- name: buildroot-ruby
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-ruby
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: ruby
  - put: buildroot-ruby-image
    params: {build: image-root}

- name: buildroot-iptables
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-images
      resource: buildroot-iptables
      trigger: true
    - get: buildroot
      trigger: true
    - get: buildroot-tarmaker-image
      params: {save: true}
      passed: [buildroot-tarmaker]
      trigger: true
  - task: build-image
    privileged: true
    file: buildroot-images/ci/build.yml
    params:
      FLAVOR: iptables
  - put: buildroot-iptables-image
    params: {build: image-root}

- name: git-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: git-resource
      trigger: true
    - get: buildroot-git-image
      params: {save: true}
      passed: [buildroot-git]
      trigger: true
  - put: git-resource-image
    params:
      load_base: buildroot-git-image
      build: git-resource
  - task: integration
    image: git-resource-image
    file: git-resource/ci/tests.yml

- name: bump-git-resource
  serial: true
  public: true
  plan:
  - get: git-resource-image
    passed: [git-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: git-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: git-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: hg-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: hg-resource
      trigger: true
    - get: buildroot-hg-image
      params: {save: true}
      passed: [buildroot-hg]
      trigger: true
  - task: unit
    file: hg-resource/ci/unit.yml
  - task: build
    file: hg-resource/ci/build.yml
  - put: hg-resource-image
    params:
      load_base: buildroot-hg-image
      build: built-resource
  - task: integration
    image: hg-resource-image
    file: hg-resource/ci/integration.yml

- name: bump-hg-resource
  serial: true
  public: true
  plan:
  - get: hg-resource-image
    passed: [hg-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: hg-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: hg-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: pool-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: pool-resource
      trigger: true
    - get: buildroot-git-image
      params: {save: true}
      passed: [buildroot-git]
      trigger: true
  - task: unit
    file: pool-resource/build.yml
  - put: pool-resource-image
    params:
      load_base: buildroot-git-image
      build: built-resource

- name: bump-pool-resource
  serial: true
  public: true
  plan:
  - get: pool-resource-image
    passed: [pool-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: pool-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: pool-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: docker-image-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: docker-image-resource
      trigger: true
    - get: buildroot-iptables-image
      params: {save: true}
      passed: [buildroot-iptables]
      trigger: true
  - task: build-resource
    file: docker-image-resource/ci/build.yml
  - put: docker-image-resource-image
    params:
      load_base: buildroot-iptables-image
      build: built-resource

- name: bump-docker-image-resource
  serial: true
  public: true
  plan:
  - get: docker-image-resource-image
    passed: [docker-image-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: docker-image-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: docker-image-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: time-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-base-image
      params: {save: true}
      passed: [buildroot-base]
      trigger: true
    - get: time-resource
      trigger: true
  - task: unit-and-build
    file: time-resource/build.yml
  - put: time-resource-image
    params:
      load_base: buildroot-base-image
      build: built-resource

- name: bump-time-resource
  serial: true
  public: true
  plan:
  - get: time-resource-image
    passed: [time-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: time-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: time-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: archive-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-curl-image
      params: {save: true}
      passed: [buildroot-curl]
      trigger: true
    - get: archive-resource
      trigger: true
  - task: build
    file: archive-resource/build.yml
  - put: archive-resource-image
    params:
      load_base: buildroot-curl-image
      build: built-resource

- name: bump-archive-resource
  serial: true
  public: true
  plan:
  - get: archive-resource-image
    passed: [archive-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: archive-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: archive-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: bosh-deployment-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-ruby-image
      params: {save: true}
      passed: [buildroot-ruby]
      trigger: true
    - get: bosh-deployment-resource
      trigger: true
  - task: unit
    file: bosh-deployment-resource/build.yml
  - put: bosh-deployment-resource-image
    params:
      load_base: buildroot-ruby-image
      build: bosh-deployment-resource

- name: bump-bosh-deployment-resource
  serial: true
  public: true
  plan:
  - get: bosh-deployment-resource-image
    passed: [bosh-deployment-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: bosh-deployment-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: bosh-deployment-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: s3-resource
  serial: true
  plan:
  - aggregate:
    - get: buildroot-base-image
      params: {save: true}
      passed: [buildroot-base]
      trigger: true
    - get: s3-resource
      trigger: true
  - task: unit
    file: s3-resource/build.yml
    params:
      S3_TESTING_ACCESS_KEY_ID:  {{s3-resource-access-key}}
      S3_TESTING_SECRET_ACCESS_KEY: {{s3-resource-secret-key}}
      S3_TESTING_BUCKET: {{s3-resource-bucket}}
      S3_VERSIONED_TESTING_BUCKET: {{s3-resource-versioned-bucket}}
      S3_TESTING_REGION: {{s3-resource-region}}
  - put: s3-resource-image
    params:
      load_base: buildroot-base-image
      build: built-resource

- name: bump-s3-resource
  serial: true
  plan:
  - get: s3-resource-image
    passed: [s3-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: s3-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: s3-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: github-release-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-base-image
      params: {save: true}
      passed: [buildroot-base]
      trigger: true
    - get: github-release-resource
      trigger: true
  - task: unit-and-build
    file: github-release-resource/build.yml
  - put: github-release-resource-image
    params:
      load_base: buildroot-base-image
      build: built-resource

- name: bump-github-release-resource
  serial: true
  public: true
  plan:
  - get: github-release-resource-image
    passed: [github-release-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: github-release-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: github-release-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: cf-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-base-image
      params: {save: true}
      passed: [buildroot-base]
      trigger: true
    - get: cf-resource
      trigger: true
    - get: cf-cli
      trigger: true
    - get: autopilot
      trigger: true
  - aggregate:
    - task: autopilot-unit
      file: autopilot/build.yml
    - task: resource-unit
      file: cf-resource/build.yml
  - put: cf-resource-image
    params:
      load_base: buildroot-base-image
      build: built-resource

- name: bump-cf-resource
  serial: true
  public: true
  plan:
  - get: cf-resource-image
    passed: [cf-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: cf-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: cf-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: semver-resource
  serial: true
  public: false # easy to leak bucket params
  plan:
  - aggregate:
    - get: buildroot-git-image
      params: {save: true}
      passed: [buildroot-git]
      trigger: true
    - get: semver-resource
      trigger: true
  - task: unit
    file: semver-resource/build.yml
    params:
      SEMVER_TESTING_ACCESS_KEY_ID: {{semver-access-key}}
      SEMVER_TESTING_SECRET_ACCESS_KEY: {{semver-secret-key}}
      SEMVER_TESTING_BUCKET: {{semver-bucket}}
      SEMVER_TESTING_REGION: {{semver-region}}
  - put: semver-resource-image
    params:
      load_base: buildroot-git-image
      build: built-resource

- name: bump-semver-resource
  serial: true
  public: false # easy to leak bucket params
  plan:
  - get: semver-resource-image
    passed: [semver-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: semver-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: semver-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: bosh-io-release-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-curl-image
      params: {save: true}
      passed: [buildroot-curl]
      trigger: true
    - get: bosh-io-release-resource
      trigger: true
  - put: bosh-io-release-resource-image
    params:
      load_base: buildroot-curl-image
      build: bosh-io-release-resource

- name: bump-bosh-io-release-resource
  serial: true
  public: true
  plan:
  - get: bosh-io-release-resource-image
    passed: [bosh-io-release-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: bosh-io-release-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: bosh-io-release-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: bosh-io-stemcell-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-curl-image
      params: {save: true}
      passed: [buildroot-curl]
      trigger: true
    - get: bosh-io-stemcell-resource
      trigger: true
  - task: unit
    file: bosh-io-stemcell-resource/build.yml
  - put: bosh-io-stemcell-resource-image
    params:
      load_base: buildroot-curl-image
      build: bosh-io-stemcell-resource

- name: bump-bosh-io-stemcell-resource
  serial: true
  public: true
  plan:
  - get: bosh-io-stemcell-resource-image
    passed: [bosh-io-stemcell-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: bosh-io-stemcell-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: bosh-io-stemcell-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: tracker-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-git-image
      params: {save: true}
      passed: [buildroot-git]
      trigger: true
    - get: tracker-resource
      trigger: true
  - task: unit
    file: tracker-resource/build.yml
    params:
      TRACKER_TOKEN: {{tracker-testing-token}}
  - put: tracker-resource-image
    params:
      load_base: buildroot-git-image
      build: built-resource

- name: bump-tracker-resource
  serial: true
  public: true
  plan:
  - get: tracker-resource-image
    passed: [tracker-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: tracker-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: tracker-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

- name: vagrant-cloud-resource
  serial: true
  public: true
  plan:
  - aggregate:
    - get: buildroot-curl-image
      params: {save: true}
      passed: [buildroot-curl]
      trigger: true
    - get: vagrant-cloud-resource
      trigger: true
  - put: vagrant-cloud-resource-image
    params:
      load_base: buildroot-curl-image
      build: vagrant-cloud-resource

- name: bump-vagrant-cloud-resource
  serial: true
  public: true
  plan:
  - get: vagrant-cloud-resource-image
    passed: [vagrant-cloud-resource]
    params: {rootfs: true}
    trigger: true
  - get: concourse
  - task: bump-package
    input_mapping:
      resource-image: vagrant-cloud-resource-image
    file: concourse/ci/bump-resource-package.yml
    params:
      RESOURCE_NAME: vagrant-cloud-resource
      BOSH_PRIVATE_CONFIG: {{bosh-private-config}}
  - put: concourse
    params: {repository: bumped-concourse, rebase: true}

resources:
- name: git-resource
  type: git
  source:
    uri: https://github.com/concourse/git-resource.git
    branch: master

- name: hg-resource
  type: git
  source:
    uri: https://github.com/concourse/hg-resource.git
    branch: master

- name: pool-resource
  type: git
  source:
    uri: https://github.com/concourse/pool-resource.git
    branch: master

- name: docker-image-resource
  type: git
  source:
    uri: https://github.com/concourse/docker-image-resource.git
    branch: master

- name: time-resource
  type: git
  source:
    uri: https://github.com/concourse/time-resource.git
    branch: master

- name: tracker-resource
  type: git
  source:
    uri: https://github.com/concourse/tracker-resource.git
    branch: master

- name: vagrant-cloud-resource
  type: git
  source:
    uri: https://github.com/concourse/vagrant-cloud-resource.git
    branch: master

- name: cf-resource
  type: git
  source:
    uri: https://github.com/concourse/cf-resource.git
    branch: master

- name: s3-resource
  type: git
  source:
    uri: https://github.com/concourse/s3-resource.git
    branch: master

- name: github-release-resource
  type: git
  source:
    uri: https://github.com/concourse/github-release-resource.git
    branch: master

- name: semver-resource
  type: git
  source:
    uri: https://github.com/concourse/semver-resource.git
    branch: master

- name: archive-resource
  type: git
  source:
    uri: https://github.com/concourse/archive-resource.git
    branch: master

- name: bosh-deployment-resource
  type: git
  source:
    uri: https://github.com/concourse/bosh-deployment-resource.git
    branch: master

- name: bosh-io-release-resource
  type: git
  source:
    uri: https://github.com/concourse/bosh-io-release-resource.git
    branch: master
    ignore_paths: [README.md]

- name: bosh-io-stemcell-resource
  type: git
  source:
    uri: https://github.com/concourse/bosh-io-stemcell-resource.git
    branch: master
    ignore_paths: [README.md]

- name: git-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/git-resource

- name: hg-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/hg-resource

- name: pool-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/pool-resource

- name: docker-image-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/docker-image-resource

- name: archive-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/archive-resource

- name: bosh-deployment-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/bosh-deployment-resource

- name: time-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/time-resource

- name: tracker-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/tracker-resource

- name: vagrant-cloud-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{docker-password}}
    repository: concourse/vagrant-cloud-resource

- name: cf-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/cf-resource

- name: s3-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/s3-resource

- name: github-release-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/github-release-resource

- name: semver-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/semver-resource

- name: bosh-io-release-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/bosh-io-release-resource

- name: bosh-io-stemcell-resource-image
  type: docker-image
  source:
    username: {{docker-username}}
    email: {{docker-email}}
    password: {{<PASSWORD>}}
    repository: concourse/bosh-io-stemcell-resource

- name: autopilot
  type: git
  source:
    uri: https://github.com/concourse/autopilot.git
    branch: master

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

- name: concourse
  type: git
  source:
    uri: git@github.com:concourse/concourse.git
    branch: develop
    private_key: {{concourse-repo-private-key}}

- name: buildroot
  type: git
  source:
    uri: git://git.buildroot.net/buildroot
    tag_filter: '[0-9][0-9][0-9][0-9].[0-9][0-9]'

- name: buildroot-edge
  type: git
  source:
    uri: git://git.buildroot.net/buildroot
    branch: master

- name: buildroot-tarmaker
  type: git
  source:
    uri: https://github.com/concourse/buildroot-images.git
{'fraction_non_alphanumeric': 0.11619933107553798, 'fraction_numerical': 0.002082500683649214, 'mean_word_length': 2.7187108886107634, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 34, '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': '4301736', 'n_tokens_mistral': 16235, 'n_tokens_neox': 15828, 'n_words': 3488}