From de51102e9180e7a382b046edcce313a431159008 Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Fri, 4 Dec 2020 11:36:12 +0100 Subject: [PATCH] [fenix] Create new android-test-beta build (https://github.com/mozilla-mobile/fenix/pull/16814) --- taskcluster/ci/build/kind.yml | 36 ++++++++++++++++--- taskcluster/ci/signing/kind.yml | 12 +++---- .../fenix_taskgraph/transforms/build.py | 18 ++++++++++ 3 files changed, 54 insertions(+), 12 deletions(-) diff --git a/taskcluster/ci/build/kind.yml b/taskcluster/ci/build/kind.yml index bd71b6a17..335abd497 100644 --- a/taskcluster/ci/build/kind.yml +++ b/taskcluster/ci/build/kind.yml @@ -54,6 +54,15 @@ jobs: treeherder: symbol: debug(B) + beta-firebase: + disable-optimization: true + run-on-tasks-for: [github-push] # We want this on push so that we detect problem before triggering a new beta + run: + gradle-build-type: beta + test-build-type: beta + treeherder: + symbol: beta(Bf) + android-test-debug: attributes: code-review: true @@ -66,10 +75,10 @@ jobs: treeherder: 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. + # android-test-nightly and android-test-beta, while still being debug builds, are meant to be signed + # with the nightly/beta 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. @@ -79,11 +88,28 @@ jobs: run: gradle-build-type: androidTest apk-artifact-template: - # 2 differences here: "androidTest/" is added and "{gradle_build_type}" is forced to "debug" + # 2 differences here: + # * "androidTest/" is added + # * "{gradle_build_type}" is forced to "debug" path: '/builds/worker/checkouts/src/app/build/outputs/apk/androidTest/debug/{fileName}' treeherder: symbol: nightly(Bat) + android-test-beta: + apk-artifact-template: + # 3 differences here: + # * "androidTest/" is added + # * "{gradle_build_type}" is forced to "beta" + # * "{fileName}" is forced to "app-beta-androidTest.apk" + path: '/builds/worker/checkouts/src/app/build/outputs/apk/androidTest/beta/app-beta-androidTest.apk' + disable-optimization: true + run: + gradle-build-type: androidTest + test-build-type: beta + run-on-tasks-for: [github-push] # We want this on push so that we detect problem before triggering a new beta + treeherder: + symbol: beta(Bat) + nightly-simulation: attributes: nightly: false diff --git a/taskcluster/ci/signing/kind.yml b/taskcluster/ci/signing/kind.yml index 8d6efef30..06eeff02b 100644 --- a/taskcluster/ci/signing/kind.yml +++ b/taskcluster/ci/signing/kind.yml @@ -28,16 +28,12 @@ job-template: worker: signing-type: by-build-type: - (beta|release): + (beta|release|android-test-beta): by-level: '3': fennec-production-signing default: dep-signing - android-test-nightly: - by-level: - '3': production-signing - default: dep-signing performance-test: dep-signing - nightly: + (nightly|android-test-nightly): by-level: '3': production-signing default: dep-signing @@ -52,12 +48,14 @@ job-template: by-build-type: # No test job runs on push against this build type. Although we do want nightly-simulation # signed to use it in the gecko trees. - nightly-simulation: [github-push] + # We want beta on push so that we detect problem before shipping it + (nightly-simulation|beta-firebase|android-test-beta): [github-push] default: [] treeherder: job-symbol: by-build-type: android-test.+: Bats + beta-firebase: Bfs default: Bs kind: build platform: android-all/opt diff --git a/taskcluster/fenix_taskgraph/transforms/build.py b/taskcluster/fenix_taskgraph/transforms/build.py index 37e51a7fc..a2ebdcf4f 100644 --- a/taskcluster/fenix_taskgraph/transforms/build.py +++ b/taskcluster/fenix_taskgraph/transforms/build.py @@ -77,6 +77,24 @@ def build_gradle_command(config, tasks): yield task +@transforms.add +def add_test_build_type(config, tasks): + for task in tasks: + test_build_type = task["run"].pop("test-build-type", "") + if test_build_type: + task["run"]["gradlew"].append( + "-PtestBuildType={}".format(test_build_type) + ) + yield task + + +@transforms.add +def add_disable_optimization(config, tasks): + for task in tasks: + if task.pop("disable-optimization", False): + task["run"]["gradlew"].append("-PdisableOptimization") + yield task + @transforms.add def add_nightly_version(config, tasks):