1
0
Fork 0

Split android-test build job into 2 so it can be signed with 2 different keys (#6779)

master
Johan Lorenzo 2019-11-26 16:20:35 +01:00 committed by Mihai Adrian
parent 5cd07d2d76
commit 3a21540ff2
5 changed files with 48 additions and 7 deletions

View File

@ -45,7 +45,7 @@ jobs:
treeherder:
symbol: debug(B)
android-test:
android-test-debug:
attributes:
code-review: true
run-on-tasks-for: [github-pull-request, github-push]
@ -56,7 +56,26 @@ jobs:
# 2 differences here: "androidTest/" is added and "{gradle_build_type}" is forced to "debug"
path: '/builds/worker/checkouts/src/app/build/outputs/apk/androidTest/{geckoview_engine}/debug/{fileName}'
treeherder:
symbol: androidTest(B)
symbol: debug(Bat)
# android-test-nightly, while still being a debug build, is meant to be signed with the nightly
# key. The Firebase testing infrastructure requires both the androidTest APK and the APK under
# test to be signed with the same key. Thus, the nightly APK being signed with nightly means
# we need an androidTest APK with the same signature.
#
# TODO: See if we can tweak the signing kind to make 2 signing jobs out of a single `android-test`
# job.
android-test-nightly:
attributes:
nightly: true
run:
geckoview-engine: geckoNightly
gradle-build-type: androidTest
apk-artifact-template:
# 2 differences here: "androidTest/" is added and "{gradle_build_type}" is forced to "debug"
path: '/builds/worker/checkouts/src/app/build/outputs/apk/androidTest/{geckoview_engine}/debug/{fileName}'
treeherder:
symbol: nightly(Bat)
performance-test:
run:

View File

@ -2,7 +2,6 @@
trust-domain: mobile
treeherder:
group-names:
'androidTest': 'Tasks related to the androidTest APK'
'beta': 'Nightly-related tasks'
'debug': 'Builds made for testing'
'forPerformanceTest': 'Builds made for Raptor and other performance tests'

View File

@ -16,7 +16,7 @@ job-template:
description: Sign Fenix
worker-type:
by-build-type:
(fennec-production|nightly|beta|production):
(fennec-production|nightly|beta|production|android-test-nightly):
by-level:
'3': signing
default: dep-signing
@ -32,6 +32,10 @@ job-template:
by-level:
'3': nightly-signing
default: dep-signing
android-test-nightly:
by-level:
'3': nightly-signing
default: dep-signing
performance-test: dep-signing
beta:
by-level:
@ -49,7 +53,10 @@ job-template:
default: {}
run-on-tasks-for: []
treeherder:
job-symbol: Bs
job-symbol:
by-build-type:
android-test.+: Bats
default: Bs
kind: build
platform: android-all/opt
tier: 2

View File

@ -10,13 +10,13 @@ transforms:
- taskgraph.transforms.task:transforms
jobs:
x86:
x86-debug:
attributes:
build-type: debug
code-review: true
dependencies:
signing: signing-debug
signing-android-test: signing-android-test
signing-android-test: signing-android-test-debug
description: Test Fenix
include-pull-request-number: true
run-on-tasks-for: [github-pull-request, github-push]

View File

@ -8,6 +8,7 @@ Apply some defaults and minor modifications to the single_dep jobs.
from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import resolve_keyed_by
from taskgraph.util.treeherder import inherit_treeherder_from_dep, join_symbol
@ -32,6 +33,21 @@ def _get_dependent_job_name_without_its_kind(dependent_job):
return dependent_job.label[len(dependent_job.kind) + 1:]
@transforms.add
def resolve_keys(config, tasks):
for task in tasks:
resolve_keyed_by(
task,
"treeherder.job-symbol",
item_name=task["name"],
**{
'build-type': task["attributes"]["build-type"],
'level': config.params["level"],
}
)
yield task
@transforms.add
def build_upstream_artifacts(config, tasks):
for task in tasks: