version: 0.2
env:
  shell: bash
  variables:
    AMPLIFY_DIR: /root/.npm-global/lib/node_modules/@aws-amplify/cli-internal/bin
    AMPLIFY_PATH: /root/.npm-global/lib/node_modules/@aws-amplify/cli/bin/amplify
    NODE_OPTIONS: --max-old-space-size=8096
    CI: true
    CODEBUILD: true
    # mock values to test artifact scanning
    ENV_VAR_WITH_SECRETS: 'MOCK_ENV_VAR_FOR_SCANNING_SECRETS'
    MOCK_ENV_VAR_FOR_SCANNING_SECRETS: 'abc123xyz'
phases:
  build:
    commands:
      - codebuild-breakpoint
      - source ./shared-scripts.sh && _runMigrationV6Test
  post_build:
    commands:
      - aws sts get-caller-identity
      - source ./shared-scripts.sh && _scanArtifacts

artifacts:
  files:
    - '**/*'
  base-directory: $CODEBUILD_SRC_DIR/packages/amplify-migration-tests/amplify-migration-reports