---
resource_types:
- name: registry-image-private
  type: registry-image
  source:
    repository: gcr.io/compute-image-tools/registry-image-forked
    tag: latest
    debug: true

resources:
- name: guest-test-infra
  type: git
  source:
    uri: https://github.com/GoogleCloudPlatform/guest-test-infra.git
    branch: master

# Controller pipeline. Add pipelines here to have them kept up to date automatically.
#
# Note: there is a relationship between this pipeline and the ones it creates - if you delete an entry here,
# the corresponding pipeline will be deleted. If you delete this pipeline, *all* these pipelines will be
# deleted.
jobs:
- name: set-self
  plan:
  - get: guest-test-infra
    trigger: true
  - set_pipeline: self
    file: guest-test-infra/concourse/pipelines/pipeline-set-pipeline.yaml

- name: set-pipelines
  plan:
  - get: guest-test-infra
    trigger: true
    passed: [set-self]
  # Produce the rendered/ output with one json file for every jsonnet file in guest-test-infra/((config_dir))
  # Either may be referenced below.
  - task: render-templates
    file: guest-test-infra/concourse/tasks/render-templates.yaml
    vars:
      config_dir: concourse/pipelines
  - set_pipeline: accelerator-image-build
    file: rendered/accelerator-image-build.json
  - set_pipeline: linux-image-build
    file: rendered/linux-image-build.json
  - set_pipeline: linux-image-build-dev
    file: rendered/linux-image-build-dev.json
  - set_pipeline: guest-package-build
    file: rendered/guest-package-build.json
  - set_pipeline: guest-package-dev-build
    file: rendered/guest-package-dev-build.json
  - set_pipeline: debian-worker-image-build
    file: guest-test-infra/concourse/pipelines/debian-worker-image-build.yaml
  - set_pipeline: windows-image-build
    file: rendered/windows-image-build.json
  - set_pipeline: windows-image-build-staging
    file: rendered/windows-image-build-staging.json
  - set_pipeline: windows-image-build-standard
    file: rendered/windows-image-build-standard.json
  - set_pipeline: windows-image-build-mbr
    file: rendered/windows-image-build-mbr.json
  - set_pipeline: container-build
    file: rendered/container-build.json
  - set_pipeline: artifact-releaser-test
    file: rendered/artifact-releaser-test.json

