|
|
@ -39,12 +39,12 @@ class TaskBuilder(object):
|
|
|
|
self.date = arrow.get(date_string)
|
|
|
|
self.date = arrow.get(date_string)
|
|
|
|
self.trust_level = trust_level
|
|
|
|
self.trust_level = trust_level
|
|
|
|
|
|
|
|
|
|
|
|
def craft_assemble_release_task(self, architectures, is_staging=False):
|
|
|
|
def craft_assemble_nightly_task(self, architectures, is_staging=False):
|
|
|
|
artifacts = {
|
|
|
|
artifacts = {
|
|
|
|
'public/target.{}.apk'.format(arch): {
|
|
|
|
'public/target.{}.apk'.format(arch): {
|
|
|
|
"type": 'file',
|
|
|
|
"type": 'file',
|
|
|
|
"path": '/opt/fenix/app/build/outputs/apk/'
|
|
|
|
"path": '/opt/fenix/app/build/outputs/apk/'
|
|
|
|
'{}Greenfield/release/app-{}-greenfield-release-unsigned.apk'.format(arch, arch),
|
|
|
|
'{}/nightly/app-{}-nightly-unsigned.apk'.format(arch, arch),
|
|
|
|
"expires": taskcluster.stringDate(taskcluster.fromNow(DEFAULT_EXPIRES_IN)),
|
|
|
|
"expires": taskcluster.stringDate(taskcluster.fromNow(DEFAULT_EXPIRES_IN)),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for arch in architectures
|
|
|
|
for arch in architectures
|
|
|
@ -72,7 +72,7 @@ class TaskBuilder(object):
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
gradle_commands = (
|
|
|
|
gradle_commands = (
|
|
|
|
'./gradlew --no-daemon -PcrashReports=true -Ptelemetry=true clean test assembleRelease',
|
|
|
|
'./gradlew --no-daemon -PcrashReports=true -Ptelemetry=true clean test assembleNightly',
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
command = ' && '.join(
|
|
|
|
command = ' && '.join(
|
|
|
@ -172,8 +172,8 @@ class TaskBuilder(object):
|
|
|
|
def craft_lint_task(self):
|
|
|
|
def craft_lint_task(self):
|
|
|
|
return self._craft_clean_gradle_task(
|
|
|
|
return self._craft_clean_gradle_task(
|
|
|
|
name='lint',
|
|
|
|
name='lint',
|
|
|
|
description='Running lint for arm64 release variant',
|
|
|
|
description='Running lint for aarch64 release variant',
|
|
|
|
gradle_task='lintAarch64GreenfieldRelease',
|
|
|
|
gradle_task='lintAarch64Release',
|
|
|
|
treeherder={
|
|
|
|
treeherder={
|
|
|
|
'jobKind': 'test',
|
|
|
|
'jobKind': 'test',
|
|
|
|
'machine': {
|
|
|
|
'machine': {
|
|
|
@ -331,22 +331,20 @@ class TaskBuilder(object):
|
|
|
|
def craft_master_commit_signing_task(
|
|
|
|
def craft_master_commit_signing_task(
|
|
|
|
self, assemble_task_id, variant
|
|
|
|
self, assemble_task_id, variant
|
|
|
|
):
|
|
|
|
):
|
|
|
|
architecture, build_type, product = _get_architecture_and_build_type_and_product_from_variant(variant)
|
|
|
|
architecture, build_type = get_architecture_and_build_type_from_variant(variant)
|
|
|
|
product = convert_camel_case_into_kebab_case(product)
|
|
|
|
|
|
|
|
postfix = convert_camel_case_into_kebab_case('{}-{}'.format(architecture, build_type))
|
|
|
|
|
|
|
|
routes = [
|
|
|
|
routes = [
|
|
|
|
'index.project.mobile.fenix.branch.master.revision.{}.{}.{}'.format(
|
|
|
|
'index.project.mobile.fenix.v2.branch.master.revision.{}.{}.{}'.format(
|
|
|
|
self.commit, product, postfix
|
|
|
|
self.commit, build_type, architecture
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'index.project.mobile.fenix.branch.master.latest.{}.{}'.format(
|
|
|
|
'index.project.mobile.fenix.v2.branch.master.latest.{}.{}.{}'.format(
|
|
|
|
product, postfix
|
|
|
|
product, build_type, architecture
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'index.project.mobile.fenix.branch.master.pushdate.{}.{}.{}.revision.{}.{}.{}'.format(
|
|
|
|
'index.project.mobile.fenix.v2.branch.master.pushdate.{}.{}.{}.revision.{}.{}.{}'.format(
|
|
|
|
self.date.year, self.date.month, self.date.day, self.commit,
|
|
|
|
self.date.year, self.date.month, self.date.day, self.commit,
|
|
|
|
product, postfix
|
|
|
|
build_type, architecture
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'index.project.mobile.fenix.branch.master.pushdate.{}.{}.{}.latest.{}.{}'.format(
|
|
|
|
'index.project.mobile.fenix.v2.branch.master.pushdate.{}.{}.{}.latest.{}.{}'.format(
|
|
|
|
self.date.year, self.date.month, self.date.day, product, postfix
|
|
|
|
self.date.year, self.date.month, self.date.day, build_type, architecture
|
|
|
|
),
|
|
|
|
),
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
@ -439,15 +437,13 @@ class TaskBuilder(object):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _craft_treeherder_platform_from_variant(variant):
|
|
|
|
def _craft_treeherder_platform_from_variant(variant):
|
|
|
|
architecture, build_type, _ = _get_architecture_and_build_type_and_product_from_variant(
|
|
|
|
architecture, build_type = get_architecture_and_build_type_from_variant(variant)
|
|
|
|
variant
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
return 'android-{}-{}'.format(architecture, build_type)
|
|
|
|
return 'android-{}-{}'.format(architecture, build_type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _craft_treeherder_group_symbol_from_variant(variant):
|
|
|
|
def _craft_treeherder_group_symbol_from_variant(variant):
|
|
|
|
_, __, product = _get_architecture_and_build_type_and_product_from_variant(variant)
|
|
|
|
_, build_type = get_architecture_and_build_type_from_variant(variant)
|
|
|
|
return product
|
|
|
|
return build_type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _craft_artifacts_from_variant(variant):
|
|
|
|
def _craft_artifacts_from_variant(variant):
|
|
|
@ -461,29 +457,19 @@ def _craft_artifacts_from_variant(variant):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _craft_apk_full_path_from_variant(variant):
|
|
|
|
def _craft_apk_full_path_from_variant(variant):
|
|
|
|
architecture, build_type, product = _get_architecture_and_build_type_and_product_from_variant(
|
|
|
|
architecture, build_type = get_architecture_and_build_type_from_variant(variant)
|
|
|
|
variant
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
short_variant = variant[:-len(build_type)]
|
|
|
|
|
|
|
|
postfix = '-unsigned' if build_type.startswith('release') else ''
|
|
|
|
postfix = '-unsigned' if build_type.startswith('release') else ''
|
|
|
|
product = lower_case_first_letter(product)
|
|
|
|
return '/opt/fenix/app/build/outputs/apk/{architecture}/{build_type}/app-{architecture}-{build_type}{postfix}.apk'.format( # noqa: E501
|
|
|
|
|
|
|
|
|
|
|
|
return '/opt/fenix/app/build/outputs/apk/{short_variant}/{build_type}/app-{architecture}-{product}-{build_type}{postfix}.apk'.format( # noqa: E501
|
|
|
|
|
|
|
|
architecture=architecture,
|
|
|
|
architecture=architecture,
|
|
|
|
build_type=build_type,
|
|
|
|
build_type=build_type,
|
|
|
|
product=product,
|
|
|
|
|
|
|
|
short_variant=short_variant,
|
|
|
|
|
|
|
|
postfix=postfix
|
|
|
|
postfix=postfix
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_SUPPORTED_ARCHITECTURES = ('aarch64', 'arm', 'x86')
|
|
|
|
_SUPPORTED_ARCHITECTURES = ('aarch64', 'arm', 'x86')
|
|
|
|
_SUPPORTED_BUILD_TYPES = ('Debug', 'Release', 'ReleaseRaptor')
|
|
|
|
|
|
|
|
_SUPPORTED_PRODUCTS = ('FirefoxBeta', 'FirefoxNightly', 'FirefoxRelease', 'Greenfield')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _get_architecture_and_build_type_and_product_from_variant(variant):
|
|
|
|
def get_architecture_and_build_type_from_variant(variant):
|
|
|
|
for supported_architecture in _SUPPORTED_ARCHITECTURES:
|
|
|
|
for supported_architecture in _SUPPORTED_ARCHITECTURES:
|
|
|
|
if variant.startswith(supported_architecture):
|
|
|
|
if variant.startswith(supported_architecture):
|
|
|
|
architecture = supported_architecture
|
|
|
|
architecture = supported_architecture
|
|
|
@ -496,32 +482,8 @@ def _get_architecture_and_build_type_and_product_from_variant(variant):
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
for supported_build_type in _SUPPORTED_BUILD_TYPES:
|
|
|
|
build_type = variant[len(architecture):]
|
|
|
|
if variant.endswith(supported_build_type):
|
|
|
|
return architecture, build_type
|
|
|
|
build_type = lower_case_first_letter(supported_build_type)
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
raise ValueError(
|
|
|
|
|
|
|
|
'Cannot identify build type in "{}". '
|
|
|
|
|
|
|
|
'Expected to find one of these supported ones: {}'.format(
|
|
|
|
|
|
|
|
variant, _SUPPORTED_BUILD_TYPES
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
remaining_variant_data = variant[len(architecture):len(variant) - len(build_type)]
|
|
|
|
|
|
|
|
for supported_product in _SUPPORTED_PRODUCTS:
|
|
|
|
|
|
|
|
if remaining_variant_data == supported_product:
|
|
|
|
|
|
|
|
product = supported_product
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
raise ValueError(
|
|
|
|
|
|
|
|
'Cannot identify product in "{}" "{}". '
|
|
|
|
|
|
|
|
'Expected to find one of these supported ones: {}'.format(
|
|
|
|
|
|
|
|
remaining_variant_data, variant, _SUPPORTED_PRODUCTS
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return architecture, build_type, product
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def schedule_task(queue, taskId, task):
|
|
|
|
def schedule_task(queue, taskId, task):
|
|
|
|