# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

loader: taskgraph.loader.transform:loader

kind-dependencies:
   - release-uptake-monitoring

transforms:
   - taskgraph.transforms.release_deps:transforms
   - taskgraph.transforms.final_verify:transforms
   - taskgraph.transforms.task:transforms

job-defaults:
   name: final-verify
   run-on-projects: []  # to make sure this never runs as part of CI
   worker-type: aws-provisioner-v1/gecko-{level}-b-linux
   worker:
      implementation: docker-worker
      os: linux
      docker-image: mozillareleases/python-test-runner@sha256:0729c2e6e7bc0d6a4cbccb2e66a78e1d8e8cbb5e44105d56e3c9c610230ebd69
      max-run-time: 7200
      retry-exit-status: 1
      env:
         BUILD_TOOLS_REPO:
            by-project:
               jamun: https://hg.mozilla.org/users/stage-ffxbld/tools
               maple: https://hg.mozilla.org/users/asasaki_mozilla.com/tools
               default: https://hg.mozilla.org/build/tools
   notifications:
      completed:
         subject: "COMPLETED: [{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]}] {task_def[metadata][name]} task"
         message: "COMPLETED: [{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]}] {task_def[metadata][name]} task"
         plugins:
            by-project:
               mozilla-beta: ["log_collect"]
               mozilla-release: ["log_collect"]
               default: []

      failed:
         subject: "FAILED: [{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]}] {task_def[metadata][name]} task"
         message: "FAILED: [{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]}] {task_def[metadata][name]} task"
         plugins:
            by-project:
               mozilla-beta: ["log_collect", "ses"]
               mozilla-release: ["log_collect", "ses"]
               default: ["ses"]
         emails:
            by-project:
               mozilla-beta: ["release-automation-notifications@mozilla.com"]
               mozilla-release: ["release-automation-notifications@mozilla.com"]
               try: ["{task_def[metadata][owner]}"]
               maple: ["release+tcstaging@mozilla.com"]
               default: []

      exception:
         subject: "EXCEPTION: [{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]}] {task_def[metadata][name]} task"
         message: "EXCEPTION: [{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]}] {task_def[metadata][name]} task"
         plugins:
            by-project:
               mozilla-beta: ["log_collect", "ses"]
               mozilla-release: ["log_collect", "ses"]
               default: ["ses"]
         emails:
            by-project:
               mozilla-beta: ["release-automation-notifications@mozilla.com"]
               mozilla-release: ["release-automation-notifications@mozilla.com"]
               try: ["{task_def[metadata][owner]}"]
               maple: ["release+tcstaging@mozilla.com"]
               default: []

jobs:
   firefox:
      description: final verify
      shipping-phase: push
      shipping-product: firefox
      worker:
         env:
            FINAL_VERIFY_CONFIGS:
               by-project:
                  jamun: "beta-firefox-linux.cfg beta-firefox-linux64.cfg beta-firefox-macosx64.cfg beta-firefox-win32.cfg beta-firefox-win64.cfg"
                  maple: "beta-firefox-linux.cfg beta-firefox-linux64.cfg beta-firefox-macosx64.cfg beta-firefox-win32.cfg beta-firefox-win64.cfg"
                  mozilla-beta: "beta-firefox-linux.cfg beta-firefox-linux64.cfg beta-firefox-macosx64.cfg beta-firefox-win32.cfg beta-firefox-win64.cfg"
                  mozilla-release: "release-firefox-linux.cfg release-firefox-linux64.cfg release-firefox-macosx64.cfg release-firefox-win32.cfg release-firefox-win64.cfg"
                  mozilla-esr52: "esr-firefox-linux.cfg esr-firefox-linux64.cfg esr-firefox-macosx64.cfg esr-firefox-win32.cfg esr-firefox-win64.cfg"
                  default: ""
      treeherder:
         platform: linux64/opt
         kind: test
         symbol: Rel(FV)
         tier: 1

   devedition:
      description: final verify
      shipping-phase: push
      shipping-product: devedition
      worker:
         env:
            FINAL_VERIFY_CONFIGS:
               by-project:
                  jamun: "aurora-devedition-linux.cfg aurora-devedition-linux64.cfg aurora-devedition-macosx64.cfg aurora-devedition-win32.cfg aurora-devedition-win64.cfg"
                  maple: "aurora-devedition-linux.cfg aurora-devedition-linux64.cfg aurora-devedition-macosx64.cfg aurora-devedition-win32.cfg aurora-devedition-win64.cfg"
                  mozilla-beta: "aurora-devedition-linux.cfg aurora-devedition-linux64.cfg aurora-devedition-macosx64.cfg aurora-devedition-win32.cfg aurora-devedition-win64.cfg"
                  mozilla-release: "release-devedition-linux.cfg release-devedition-linux64.cfg release-devedition-macosx64.cfg release-devedition-win32.cfg release-devedition-win64.cfg"
                  mozilla-esr52: "esr-devedition-linux.cfg esr-devedition-linux64.cfg esr-devedition-macosx64.cfg esr-devedition-win32.cfg esr-devedition-win64.cfg"
                  default: ""
      treeherder:
         platform: linux64-devedition/opt
         kind: test
         symbol: Rel(FV)
         tier: 1
