mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
97 lines
3.0 KiB
Python
97 lines
3.0 KiB
Python
# 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/.
|
|
|
|
"""
|
|
Decision task for nightly releases.
|
|
"""
|
|
|
|
from __future__ import print_function
|
|
|
|
import argparse
|
|
import datetime
|
|
import os
|
|
import re
|
|
|
|
import taskcluster
|
|
|
|
from lib.gradle import get_variant
|
|
from lib.tasks import (
|
|
fetch_mozharness_task_id,
|
|
schedule_task_graph,
|
|
TaskBuilder,
|
|
)
|
|
from lib.chain_of_trust import (
|
|
populate_chain_of_trust_task_graph,
|
|
populate_chain_of_trust_required_but_unused_files
|
|
)
|
|
|
|
def pr(builder):
|
|
tasks = []
|
|
|
|
variant = get_variant('debug', 'geckoNightly')
|
|
tasks.append(builder.craft_assemble_pr_task(variant))
|
|
tasks.append(builder.craft_test_pr_task(variant))
|
|
|
|
for craft_function in (
|
|
builder.craft_detekt_task,
|
|
builder.craft_ktlint_task,
|
|
builder.craft_lint_task,
|
|
builder.craft_compare_locales_task,
|
|
builder.craft_ui_tests_task,
|
|
):
|
|
tasks.append(craft_function())
|
|
|
|
for task in tasks:
|
|
task['attributes']['code-review'] = True
|
|
|
|
return tasks
|
|
|
|
def push(builder):
|
|
# We want the same tasks on pushes than on PRs, for now.
|
|
return pr(builder)
|
|
|
|
def raptor(builder, is_staging):
|
|
mozharness_task_id = fetch_mozharness_task_id()
|
|
gecko_revision = taskcluster.Queue({
|
|
'rootUrl': os.environ.get('TASKCLUSTER_PROXY_URL', 'https://taskcluster.net'),
|
|
}).task(mozharness_task_id)['payload']['env']['GECKO_HEAD_REV']
|
|
|
|
variant = get_variant('forPerformanceTest', 'geckoNightly')
|
|
build_task = builder.craft_assemble_raptor_task(variant)
|
|
|
|
# Signing and Raptor tasks are generated in taskgraph
|
|
return [build_task]
|
|
|
|
|
|
def release(builder, channel, engine, is_staging, version_name):
|
|
variant = get_variant('fenix' + channel.capitalize(), engine)
|
|
build_task = builder.craft_assemble_release_task(variant, channel, is_staging, version_name)
|
|
|
|
# The signing push-apk tasks are generated by taskgraph
|
|
return [build_task]
|
|
|
|
|
|
def release_as_fennec(builder, is_staging, version_name):
|
|
variant = get_variant('fennecProduction', 'geckoBeta')
|
|
channel = 'fennec-production'
|
|
|
|
build_task = builder.craft_assemble_release_task(variant, channel, is_staging, version_name)
|
|
|
|
# The signing task is generated by taskgraph
|
|
return [build_task]
|
|
|
|
|
|
def nightly_to_production_app(builder, is_staging, version_name):
|
|
# Since the Fenix nightly was launched, we've pushed it to the production app "org.mozilla.fenix" on the
|
|
# "nightly" track. We're moving towards having each channel be published to its own app, but we need to
|
|
# keep updating this "backwards-compatible" nightly for a while yet
|
|
variant = get_variant('fenixNightlyLegacy', 'geckoNightly')
|
|
taskcluster_apk_paths = variant.upstream_artifacts()
|
|
|
|
build_task = builder.craft_assemble_release_task(
|
|
variant, 'nightly-legacy', is_staging, version_name)
|
|
|
|
# Nimbledroid, signing and push-apk tasks are generated by taskgraph
|
|
return [build_task]
|