anchor.diff:          params: {file: version-semver/number}
         - task: build
           file: bosh-cpi-src/ci/tasks/build-candidate.yml
  -      - put: bosh-cpi-dev-artifacts
  +      - put: bosh-cpi-dev-artifacts-v2
           params: {file: candidate/*.tgz}
   
     - name: integration
  
positive.code:       - aggregate:
          - {trigger: true, passed: [build-cpi], get: bosh-cpi-src, resource: bosh-cpi-src}
        - <<: *create-environment
        - aggregate:
          - task: test-cpi-v2
            file: bosh-cpi-src/ci/tasks/run-integration.yml
            params:
              AWS_ACCESS_KEY_ID:                       {{aws_access_key__cpi}}
              AWS_SECRET_ACCESS_KEY:                   {{aws_secret_key__cpi}}
              BOSH_AWS_PERMISSIONS_AUDITOR_KEY_ID:     {{aws_access_key__auditor}}
              BOSH_AWS_PERMISSIONS_AUDITOR_SECRET_KEY: {{aws_secret_key__auditor}}
              AWS_DEFAULT_REGION:                      {{aws_region__primary}}
              BOSH_AWS_KMS_KEY_ARN:                    {{aws_kms_key_arn}}
              BOSH_AWS_CPI_API_VERSION: 2
          - task: test-cpi-v1
            file: bosh-cpi-src/ci/tasks/run-integration.yml
            params:
              AWS_ACCESS_KEY_ID:                       {{aws_access_key__cpi}}
              AWS_SECRET_ACCESS_KEY:                   {{aws_secret_key__cpi}}
              BOSH_AWS_PERMISSIONS_AUDITOR_KEY_ID:     {{aws_access_key__auditor}}
              BOSH_AWS_PERMISSIONS_AUDITOR_SECRET_KEY: {{aws_secret_key__auditor}}
              AWS_DEFAULT_REGION:                      {{aws_region__primary}}
              BOSH_AWS_KMS_KEY_ARN:                    {{aws_kms_key_arn}}
              BOSH_AWS_CPI_API_VERSION: 1
      ensure:
        do:
          - <<: *ensure-terminated
  
negative.code:       repository: ljfranklin/terraform-resource
  
  resources:
    - name: bosh-cpi-dev-artifacts-v2
      type: s3
      source:
        regexp: bosh-aws-cpi-(\d+\.\d+\.\d+)\.tgz
  