$inherits:
  from: 'tasks/builds/mobile_base.yml'
  variables:
    build_name: 'android-api-15-partner-sample1'
    build_type: 'opt'
task:
  metadata:
      name: '[TC] Android armv7 API 15+ partner sample 1'
      description: 'Android armv7 API 15+ partner sample 1'

  workerType: android-api-15

  routes:
    - 'index.buildbot.branches.{{project}}.android-api-15-partner-sample1'
    - 'index.buildbot.revisions.{{head_rev}}.{{project}}.android-api-15-partner-sample1'

  scopes:
    - 'docker-worker:cache:level-{{level}}-{{project}}-build-android-api-15-workspace'
    - 'docker-worker:cache:tooltool-cache'
    - 'docker-worker:relengapi-proxy:tooltool.download.internal'
    - 'docker-worker:relengapi-proxy:tooltool.download.public'

  payload:
    cache:
      level-{{level}}-{{project}}-build-android-api-15-workspace: '/home/worker/workspace'
      tooltool-cache: '/home/worker/tooltool-cache'

    features:
      relengAPIProxy: true

    env:
      # inputs to mozharness
      MOZHARNESS_SCRIPT: 'mozharness/scripts/fx_desktop_build.py'
      # TODO: make these additional configuration files go away
      MOZHARNESS_CONFIG: >
          builds/releng_base_android_64_builds.py
          disable_signing.py
          platform_supports_post_upload_to_latest.py
      MH_CUSTOM_BUILD_VARIANT_CFG: api-15-partner-sample1
      MH_BRANCH: {{project}}
      MH_BUILD_POOL: taskcluster

      # space separated list of repositories required for this build
      # for each ITEM in list you want checked out, you must also supply tc-vcs args:
      # e.g. ${ITEM}_BASE_REPOSITORY
      EXTRA_CHECKOUT_REPOSITORIES: >
          PARTNER

      PARTNER_BASE_REPOSITORY: 'https://github.com/mozilla/fennec-distribution-sample'
      PARTNER_HEAD_REPOSITORY: 'https://github.com/mozilla/fennec-distribution-sample'
      PARTNER_HEAD_REV: 756f0378d4cac87e5e6c405249ede5effe082da2
      PARTNER_DEST_DIR: '/home/worker/workspace/build/partner'

    maxRunTime: 36000

    command: ["/bin/bash", "bin/build.sh"]

  extra:
    treeherderEnv:
      - production
      - staging
    treeherder:
      machine:
        # see https://github.com/mozilla/treeherder/blob/master/ui/js/values.js
        platform: android-4-0-armv7-api15-partner1
    # Rather then enforcing particular conventions we require that all build
    # tasks provide the "build" extra field to specify where the build and tests
    # files are located.
    locations:
      build: 'public/build/target.linux-x86_64.tar.bz2'
      tests: 'public/build/target.tests.zip'
