anchor.diff:        - 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
  +      #- 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
  +      - <<: *destroy-environment
  +      - <<: *create-environment
  +      - 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
  
positive.code:         params: {file: version-semver/number}
        - task: build
          file: bosh-cpi-src/ci/tasks/build-candidate.yml
        - put: bosh-cpi-dev-artifacts
          params: {file: candidate/*.tgz}
  
    - name: integration
  
negative.code: <%
  stemcell_resources = [
    [{name: 'stemcell', resource: 'precompiled-stemcell-v1'}, {name: 'heavy-stemcell', resource: 'heavy-ubuntu-stemcell-v1'}],
    [{name: 'stemcell', resource: 'heavier-ubuntu-stemcell-v2'},{name: 'heavy-stemcell', resource: 'heavier-ubuntu-stemcell-v2'}]
  ]
  director_resources = [
    {name: 'bosh-release', resource: 'precompiled-bosh-release', ops_file: ''},
  