machine:
  node:
    version: 0.10.40
  environment:
    LANG: en_US.utf8
dependencies:
  pre:
    - npm -g install npm@latest-2
  override:
    - npm install
    - if [ "$CIRCLE_BRANCH" = "staging" ]; then npm install cp-zen-frontend@staging; fi
test:
  override:
    - npm run test
deployment:
  production:
    branch: master
    codedeploy:
      cp-zen-platform:
        application_root: /
        region: eu-west-1
        revision_location:
          revision_type: S3
          s3_location:
            bucket: zen-deployments
            key_pattern: applications/cp-zen-platform-ci-{BUILD_NUM}.zip
        deployment_group: prod-zen
        deployment_config: CodeDeployDefault.OneAtATime
  staging:
    branch: staging
    codedeploy:
      cp-zen-platform-staging:
        application_root: /
        region: eu-west-1
        revision_location:
          revision_type: S3
          s3_location:
            bucket: zen-deployments
            key_pattern: staging/applications/cp-zen-platform-staging-{SHORT_COMMIT}-{BUILD_NUM}.zip
        deployment_group: staging-zen
        deployment_config: CodeDeployDefault.OneAtATime

machine:
  node:
    version: 0.10.40
  environment:
    LANG: en_US.utf8
dependencies:
  pre:
    - npm -g install npm@latest-2
  override:
    - npm install
    - if [ "$CIRCLE_BRANCH" = "staging" ]; then npm install --save cp-zen-frontend@staging; fi
test:
  override:
    - npm run test
deployment:
  production:
    branch: master
    codedeploy:
      cp-zen-platform:
        application_root: /
        region: eu-west-1
        revision_location:
          revision_type: S3
          s3_location:
            bucket: zen-deployments
            key_pattern: applications/cp-zen-platform-ci-{BUILD_NUM}.zip
        deployment_group: prod-zen
        deployment_config: CodeDeployDefault.OneAtATime
  staging:
    branch: staging
    codedeploy:
      cp-zen-platform-staging:
        application_root: /
        region: eu-west-1
        revision_location:
          revision_type: S3
          s3_location:
            bucket: zen-deployments
            key_pattern: staging/applications/cp-zen-platform-staging-{SHORT_COMMIT}-{BUILD_NUM}.zip
        deployment_group: staging-zen
        deployment_config: CodeDeployDefault.OneAtATime

Save cp-zen-frontend@staging so SRCCLR doesn't override it
Save cp-zen-frontend@staging so SRCCLR doesn't override it
