# Use Python 2.7 for scripts
python:
  python_version: 2.7

system:
  queue:
    - branch: master
      queue: master
    - branch: "feature/*"
      queue: feature

hooks:
  pre_setup: |
    set -e # Exit on error
    git clone https://github.com/SalesforceFoundation/CumulusCI CumulusCI
    cd CumulusCI
    git fetch --all
    git checkout features/cloud-ci-integrations
    pip install -r requirements.txt
    cd ..
    mkdir apex_debug_logs

  post_build: "cumulusci ci next_step"

environment:
  CUMULUSCI_PATH: CumulusCI
  DEBUG_TESTS: true

test_pattern: 
  - 'none'

plan:
  - profile: build_router
    sets: next_profile
  - profile: "{{ next_profile }}"
    sets: next_profile

profiles:
  build_router:
    tests:
      - type: junit
        command: cumulusci ci build_router
        report_files:
        - "test_results_junit.xml"

  package_beta:
    tests:
      - type: custom
        command: cumulusci package_beta $SOLANO_CURRENT_COMMIT

  deploy_beta:
    environment:
      SF_USERNAME: $SF_USERNAME_BETA
      SF_PASSWORD: $SF_PASSWORD_BETA
    tests:
      - 'cumulusci managed_deploy --run-tests --version {{ version }}'

collect:
  repo:
    - test_results.json
    - test_results_junit.xml

# Use Python 2.7 for scripts
python:
  python_version: 2.7

system:
  queue:
    - branch: master
      queue: master
    - branch: "feature/*"
      queue: feature

hooks:
  pre_setup: |
    set -e # Exit on error
    git clone https://github.com/SalesforceFoundation/CumulusCI CumulusCI
    cd CumulusCI
    git fetch --all
    git checkout features/cloud-ci-integrations
    pip install -r requirements.txt
    cd ..
    mkdir apex_debug_logs

  post_build: "cumulusci ci next_step"

environment:
  CUMULUSCI_PATH: CumulusCI
  DEBUG_TESTS: true

test_pattern: 
  - 'none'

plan:
  - profile: build_router
    sets: next_profile
  - profile: "{{ next_profile }}"
    sets: next_profile

profiles:
  build_router:
    tests:
      - type: junit
        command: cumulusci ci build_router
        report_files:
        - "test_results_junit.xml"

  package_beta:
    tests:
      - type: custom
        command: cumulusci package_beta $TDDIUM_CURRENT_COMMIT

  deploy_beta:
    environment:
      SF_USERNAME: $SF_USERNAME_BETA
      SF_PASSWORD: $SF_PASSWORD_BETA
    tests:
      - 'cumulusci managed_deploy --run-tests --version {{ version }}'

collect:
  repo:
    - test_results.json
    - test_results_junit.xml

Fix env variable for commit
Fix env variable for commit
