Skip to content

Commit

Permalink
[VPN-6080] Refactor beetmover tasks to be distinct to each shipping …
Browse files Browse the repository at this point in the history
…phase (#8931)

* ci: Refactor some beetmover logic out of the 'tasks' hot loop

* ci: Add version to beetmover ship-client task's description

* ci: Remove 'if-dependencies', 'worker' and 'treeherder' keys from beetmover tasks

The `beetmover` transforms weren't using these keys in any way, nor
were they forwarding these keys on to the next set of transforms. So
the configs defined here were no-ops.

* ci: Consolidate beetmover logic to 'task-defaults'

* ci: Add a schema for beetmover tasks

* [VPN-6080] create distinct beetmover tasks for each shipping phase

This refactors the beetmover transform to generate distinct tasks for
each shipping phase. This is more inline with how other projects work
and is a pre-requisite for integrating VPN with Shipit, which has
assumptions around how the tasks are set up.

Issue: #8919
  • Loading branch information
ahal authored Jan 15, 2024
1 parent fefe5cf commit 4920011
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,149 +17,66 @@ kind-dependencies:
- mac-notarization
- repackage-signing

task-defaults:
beetmover-action: "push-to-candidates"
run-on-tasks-for: [action]
worker-type: beetmover

tasks:
android-arm64:
requires-level: 3
worker-type: beetmover
worker:
chain-of-trust: true
max-run-time: 1800
run-on-tasks-for: [action]
release-artifacts: [mozillavpn-arm64-v8a-release.apk]
dependencies:
signing: signing-android-arm64/release
if-dependencies: [signing]
attributes:
build-type: android/arm64-v8a
treeherder:
symbol: BM(android)
kind: build
tier: 1
platform: android/arm64-v8a
android-armv7:
requires-level: 3
worker-type: beetmover
worker:
chain-of-trust: true
max-run-time: 1800
run-on-tasks-for: [action]
release-artifacts: [mozillavpn-armeabi-v7a-release.apk]
dependencies:
signing: signing-android-armv7/release
if-dependencies: [signing]
attributes:
build-type: android/armv7
treeherder:
symbol: BM(android)
kind: build
tier: 1
platform: android/armv7
android-x86:
requires-level: 3
worker-type: beetmover
worker:
chain-of-trust: true
max-run-time: 1800
run-on-tasks-for: [action]
release-artifacts: [mozillavpn-x86-release.apk]
dependencies:
signing: signing-android-x86/release
if-dependencies: [signing]
attributes:
build-type: android/x86
treeherder:
symbol: BM(android)
kind: build
tier: 1
platform: android/x86
android-x64:
requires-level: 3
worker-type: beetmover
worker:
chain-of-trust: true
max-run-time: 1800
run-on-tasks-for: [action]
release-artifacts: [mozillavpn-x86_64-release.apk]
dependencies:
signing: signing-android-x64/release
if-dependencies: [signing]
attributes:
build-type: android/x64
treeherder:
symbol: BM(android)
kind: build
tier: 1
platform: android/x64
macos:
requires-level: 3
worker-type: beetmover
worker:
chain-of-trust: true
max-run-time: 1800
run-on-tasks-for: [action]
release-artifacts: [MozillaVPN.pkg]
dependencies:
signing: signing-macos/opt
mac-notarization: mac-notarization-macos/opt
if-dependencies: [signing]
attributes:
build-type: macos/opt
treeherder:
symbol: BM(macos)
kind: build
tier: 1
platform: macos/opt
windows:
worker-type: beetmover
worker:
chain-of-trust: true
max-run-time: 1800
run-on-tasks-for: [action]
release-artifacts: [MozillaVPN.msi]
dependencies:
repackage-signing: repackage-signing-msi
if-dependencies: [repackage-signing]
attributes:
build-type: windows/opt
treeherder:
symbol: BM(windows)
kind: build
tier: 1
platform: windows/x86_64
addons-bundle:
worker-type: beetmover
worker:
chain-of-trust: true
max-run-time: 1800
run-on-tasks-for: [action]
# The addons-bundle release-artifacts are dynamically generated in the beetmover transform
release-artifacts: []
dependencies:
build: build-addons-bundle
if-dependencies: [build]
attributes:
build-type: addons/opt
treeherder:
symbol: BM(addons-bundle)
kind: build
tier: 1
platform: addons/opt
addons-manifest:
worker-type: beetmover
worker:
chain-of-trust: true
max-run-time: 1800
run-on-tasks-for: [action]
release-artifacts:
- manifest.json
- manifest.json.sig
dependencies:
signing: signing-addons-bundle
if-dependencies: [signing]
attributes:
build-type: addons/opt
treeherder:
symbol: BM(addons-manifest)
kind: build
tier: 1
platform: addons/opt
70 changes: 70 additions & 0 deletions taskcluster/kinds/beetmover-ship/kind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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/.
---
loader: taskgraph.loader.transform:loader

transforms:
- taskgraph.transforms.from_deps
- mozilla_taskgraph.transforms.scriptworker.release_artifacts
- mozillavpn_taskgraph.transforms.beetmover
- taskgraph.transforms.task

kind-dependencies:
- beetmover-promote
- build
- signing

task-defaults:
from-deps:
kinds: [beetmover-promote]
group-by: all
set-name: false
unique-kinds: false
worker-type: beetmover
worker:
chain-of-trust: true
max-run-time: 1800
run-on-tasks-for: [action]

tasks:
client:
beetmover-action: "push-to-releases"
from-deps:
copy-attributes: true
with-attributes:
shipping-phase: promote-client

# Beetmoverscript doesn't support the `push-to-release` action for VPN
# addons yet, as they use a slightly different directory structure on
# archive.mozilla.org.
#
# For that reason, we need to use the `direct-push-to-bucket` action to
# re-upload the build artifacts rather than copying them over from the
# candidates dir. This means we need to depend on the build dependencies
# even in the `ship` phase. We also depend on the `beetmover-promote` tasks
# just to ensure we don't skip uploading to the candidates dir.
addons-bundle:
beetmover-action: "direct-push-to-bucket"
attributes:
build-type: "addons/opt"
from-deps:
with-attributes:
shipping-phase: promote-addons
dependencies:
build: build-addons-bundle
# The addons-bundle release-artifacts are dynamically generated in the beetmover transform
release-artifacts: []

addons-manifest:
beetmover-action: "direct-push-to-bucket"
attributes:
build-type: "addons/opt"
from-deps:
with-attributes:
shipping-phase: promote-addons
dependencies:
signing: signing-addons-bundle
release-artifacts:
- manifest.json
- manifest.json.sig
3 changes: 2 additions & 1 deletion taskcluster/kinds/release-notify/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ transforms:
- taskgraph.transforms.task:transforms

kind-dependencies:
- beetmover
- beetmover-promote
- beetmover-ship

task-defaults:
description: "Sends notifications to #mozilla-vpn-release in Slack"
Expand Down
Loading

0 comments on commit 4920011

Please sign in to comment.