forked from mozilla/application-services
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This task publishes artifacts needed by consumers to use the nightly, including: - maven.json: where were the maven packages published? - swift-components.zip: generated swift files + xcframework - nimbus-fml.zip / nimbus-fml.sha256: nimbus-fml binary Currently, nightly builds use a different maven group id (org.mozilla.appservices.nightly) to separate them from "real" builds, although this may change based on feedback from the Android team Don't try to publish maven packages using the nightly repos. The Android team prefers them in the regular repos. Small fix to make exceptions print out correctly for NimbusGradlePlugin. I was seeing a lot of download errors when testing this. Building swift-components.zip required building on a mac worker, which required some extra work/hacking - Added a `run-commands` job implementation that works on `generic-worker`. - The ios tests are not working yet, so I just commented them out. - For now the entire build happens in one task. Eventually we should split it up, maybe into toolchain task and a separate build/test task for Fenix/Focus. - Updated several of our scripts to use env vars rather than hardcoding things based on the docker-worker.
- Loading branch information
Showing
28 changed files
with
605 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 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/. | ||
|
||
def get_maven_bucket(params): | ||
if params['level'] == '3': | ||
return "maven-production" | ||
else: | ||
return "maven-staging" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
taskcluster/app_services_taskgraph/transforms/appservices.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 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/. | ||
|
||
|
||
from taskgraph.transforms.base import TransformSequence | ||
|
||
from ..build_config import get_version | ||
|
||
transforms = TransformSequence() | ||
|
||
@transforms.add | ||
def transform_routes(config, tasks): | ||
version = get_version(config.params) | ||
for task in tasks: | ||
task["routes"] = [ | ||
route.replace("{appservices_version}", version) | ||
for route in task.get("routes", []) | ||
] | ||
yield task | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
taskcluster/app_services_taskgraph/transforms/nightly_publish.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# 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/. | ||
|
||
|
||
from taskgraph.transforms.base import TransformSequence | ||
|
||
from ..build_config import get_version | ||
from ..beetmover import get_maven_bucket | ||
|
||
transforms = TransformSequence() | ||
|
||
@transforms.add | ||
def setup_command(config, tasks): | ||
version = get_version(config.params) | ||
if config.params['level'] == '3': | ||
if config.params.get('preview-build') is None: | ||
maven_channel = "maven-production" | ||
else: | ||
maven_channel = "maven-nightly-production" | ||
else: | ||
if config.params.get('preview-build') is None: | ||
maven_channel = "maven-staging" | ||
else: | ||
maven_channel = "maven-nightly-staging" | ||
|
||
for task in tasks: | ||
task["run"]["commands"] = [ | ||
[ | ||
"/builds/worker/checkouts/vcs/taskcluster/scripts/generate-nightly-json.py", | ||
"/builds/worker/checkouts/vcs/build/nightly.json", | ||
"--version", version, | ||
"--maven-channel", maven_channel, | ||
] | ||
] | ||
task["routes"] = [ | ||
"index.project.application-services.v2.nightly.latest", | ||
f"index.project.application-services.v2.nightly.{version}", | ||
] | ||
yield task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# 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/. | ||
--- | ||
# nightly-publish: publish artifacts for successful nightly builds | ||
# | ||
# This task publishes the nightly.json file for the nightly builds. | ||
# nightly.json is used by consumer apps for their nightly app-services version | ||
# bump. | ||
# | ||
# This task only runs if nightly-summary succeeds, which implies that all other | ||
# tasks suceeded. This task should not fail, since that could leave the | ||
# nightly artifacts in an inconsistent state. | ||
loader: taskgraph.loader.transform:loader | ||
|
||
kind-dependencies: | ||
- nightly-summary | ||
|
||
transforms: | ||
- app_services_taskgraph.transforms.nightly_publish:transforms | ||
- taskgraph.transforms.job:transforms | ||
- taskgraph.transforms.task:transforms | ||
|
||
tasks: | ||
nightly_publish: | ||
attributes: | ||
nightly: nightly-only | ||
label: "Nightly build publish task" | ||
description: "Publish nightly artifacts" | ||
worker-type: b-linux | ||
worker: | ||
chain-of-trust: true | ||
docker-image: { in-tree: linux } | ||
max-run-time: 1800 | ||
env: {} | ||
artifacts: | ||
- name: "public/build/nightly.json" | ||
path: "/builds/worker/checkouts/vcs/build/nightly.json" | ||
type: "file" | ||
run: | ||
using: run-commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# 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/. | ||
|
||
# ⚠️ If you add, rename or delete a task here, please also update .mergify.yml! ⚠️ | ||
--- | ||
loader: taskgraph.loader.transform:loader | ||
|
||
transforms: | ||
- app_services_taskgraph.transforms.appservices:transforms | ||
- taskgraph.transforms.job:transforms | ||
- taskgraph.transforms.task:transforms | ||
|
||
kind-dependencies: | ||
- toolchain | ||
|
||
tasks: | ||
build: | ||
attributes: | ||
run-on-pr-type: all | ||
resource-monitor: true | ||
needs-sccache: false # TODO: Bug 1623426 deal with this once we're in prod | ||
run-on-tasks-for: [github-pull-request, github-release, cron] | ||
description: Build and test (Swift) | ||
scopes: | ||
- project:releng:services/tooltool/api/download/internal | ||
worker-type: b-linux | ||
worker: | ||
docker-image: { in-tree: linux } | ||
max-run-time: 1800 | ||
artifacts: | ||
- name: "public/build/nimbus-fml.zip" | ||
path: "/builds/worker/checkouts/vcs/build/nimbus-fml.zip" | ||
type: "file" | ||
- name: "public/build/nimbus-fml.sha256" | ||
path: "/builds/worker/checkouts/vcs/build/nimbus-fml.sha256" | ||
type: "file" | ||
run: | ||
pre-commands: | ||
- [git, submodule, update, --init] | ||
- [source, taskcluster/scripts/toolchain/setup-fetched-rust-toolchain.sh] | ||
- [rsync, '-a', /builds/worker/fetches/libs/, /builds/worker/checkouts/vcs/libs/] | ||
commands: | ||
- [ | ||
"/builds/worker/checkouts/vcs/taskcluster/scripts/build-nimbus-fml.py", | ||
"/builds/worker/checkouts/vcs/build/", | ||
] | ||
using: run-commands | ||
use-caches: true | ||
fetches: | ||
toolchain: | ||
- desktop-linux-libs | ||
- rust | ||
routes: | ||
- index.project.application-services.v2.nimbus-fml.{appservices_version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# 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/. | ||
|
||
# ⚠️ If you add, rename or delete a task here, please also update .mergify.yml! ⚠️ | ||
--- | ||
loader: taskgraph.loader.transform:loader | ||
|
||
transforms: | ||
- app_services_taskgraph.transforms.appservices:transforms | ||
- taskgraph.transforms.job:transforms | ||
- taskgraph.transforms.task:transforms | ||
|
||
kind-dependencies: | ||
- toolchain | ||
|
||
tasks: | ||
build: | ||
attributes: | ||
run-on-pr-type: all | ||
resource-monitor: true | ||
needs-sccache: false # TODO: Bug 1623426 deal with this once we're in prod | ||
run-on-tasks-for: [github-pull-request, github-release, cron] | ||
description: Build and test (Swift) | ||
scopes: | ||
- project:releng:services/tooltool/api/download/internal | ||
worker-type: b-osx | ||
worker: | ||
max-run-time: 1800 | ||
artifacts: | ||
- name: "public/build/swift-components.tar.xz" | ||
path: "checkouts/vcs/build/swift-components.tar.xz" | ||
type: "file" | ||
- name: "public/build/MozillaRustComponents.xcframework.zip" | ||
path: "checkouts/vcs/build/MozillaRustComponents.xcframework.zip" | ||
type: "file" | ||
- name: "public/build/FocusRustComponents.xcframework.zip" | ||
path: "checkouts/vcs/build/FocusRustComponents.xcframework.zip" | ||
type: "file" | ||
# TODO: re-enable once we get tests working | ||
# - name: "public/build/raw_xcodetest.log" | ||
# path: "checkouts/vcs/logs/raw_xcodetest.log" | ||
# type: "file" | ||
run: | ||
pre-commands: | ||
- ["taskcluster/scripts/toolchain/build-rust-toolchain-macosx.sh"] | ||
- ["taskcluster/scripts/toolchain/libs-ios.sh"] | ||
commands: | ||
- ["taskcluster/scripts/build-and-test-swift.sh"] | ||
- [ "cd", "build/" ] | ||
- [ "tar", "acf", "swift-components.tar.xz", "swift-components" ] | ||
using: run-commands | ||
run-task-command: ["/usr/local/bin/python3", "run-task"] | ||
use-caches: true | ||
routes: | ||
- index.project.application-services.v2.swift.{appservices_version} |
Oops, something went wrong.