Skip to content

Commit c2f788a

Browse files
committed
VPN-6098: Create a 'mark-as-shipped' task for Shipit integration
This task makes a call to the Shipit API to update the release's status to "shipped" once all other release tasks have successfully completed. Issue: #8945
1 parent 61a5fc4 commit c2f788a

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

taskcluster/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ workers:
105105
implementation: beetmover-import-from-gcs-to-artifact-registry
106106
os: scriptworker
107107
worker-type: 'mozillavpn-{level}-beetmover'
108+
shipit:
109+
provisioner: scriptworker-k8s
110+
implementation: scriptworker-shipit
111+
os: scriptworker
112+
worker-type: 'mozillavpn-{level}-shipit'
108113
succeed:
109114
provisioner: built-in
110115
implementation: succeed
@@ -126,3 +131,6 @@ release-promotion:
126131
- fetch
127132
- toolchain
128133
- toolchain-openssl
134+
135+
shipit:
136+
scope-prefix: project:mozillavpn:releng:ship-it
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
---
5+
loader: taskgraph.loader.transform:loader
6+
7+
transforms:
8+
- taskgraph.transforms.from_deps
9+
- mozillavpn_taskgraph.transforms.set_name
10+
- mozilla_taskgraph.transforms.scriptworker.shipit.mark_as_shipped
11+
- taskgraph.transforms.task
12+
13+
kind-dependencies:
14+
- beetmover-ship
15+
16+
tasks:
17+
mark-as-shipped:
18+
worker-type: shipit
19+
from-deps:
20+
group-by:
21+
attribute: shipping-phase
22+
copy-attributes: true
23+
unique-kinds: false
24+
set-name: false
25+
shipit-product:
26+
by-build-type:
27+
addons/opt: mozilla-vpn-addons
28+
default: mozilla-vpn-client
29+
run-on-tasks-for: [action]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from taskgraph.transforms.base import TransformSequence
2+
from taskgraph.util.dependencies import get_primary_dependency
3+
4+
5+
transforms = TransformSequence()
6+
7+
8+
@transforms.add
9+
def set_name(config, tasks):
10+
for task in tasks:
11+
if config.kind == "mark-as-shipped":
12+
dep = get_primary_dependency(config, task)
13+
assert dep
14+
15+
product = (
16+
"addons" if dep.attributes["build-type"] == "addons/opt" else "client"
17+
)
18+
task["name"] = f"mark-as-shipped-{product}"
19+
20+
yield task

0 commit comments

Comments
 (0)