# 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/.
---
# release-publish: publish artifacts for successful nightly/release builds
#
# This task publishes a JSON file for the nightly/release builds. The JSON file is used by consumer
# apps for app-services version bumps.
#
# This task only runs if build-summary succeeds, which implies that all other
# tasks succeeded.  This task should not fail, since that could leave the
# build artifacts in an inconsistent state.
loader: taskgraph.loader.transform:loader

kind-dependencies:
  - build-summary
  - nimbus-build

transforms:
  - app_services_taskgraph.transforms.worker:transforms
  - app_services_taskgraph.transforms.nimbus:assemble
  - app_services_taskgraph.transforms.release_artifacts
  - app_services_taskgraph.transforms.appservices
  - taskgraph.transforms.run
  - taskgraph.transforms.task

task-defaults:
  attributes:
    run-on-pr-type: full-ci
  worker-type: b-linux
  worker:
    chain-of-trust: true
    max-run-time: 1800

tasks:
  nimbus-fml:
    attributes:
      nimbus-binary: "nimbus-fml"
      release-routes:
        - index.project.{project}.v2.nimbus-fml.{appservices_version}
    description: "Assemble nimbus-fml"

  nimbus-cli:
    attributes:
      nimbus-binary: "nimbus-cli"
      release-routes:
        - index.project.{project}.v2.nimbus-cli.{appservices_version}
        - index.project.{project}.v2.nimbus-cli.latest
    description: "Assemble nimbus-cli"
