From c2f788adf537b9c668cfda99bffd6a2fd34d65f2 Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Thu, 11 Jan 2024 15:52:27 -0500 Subject: [PATCH 1/2] 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 --- taskcluster/config.yml | 8 +++++ taskcluster/kinds/mark-as-shipped/kind.yml | 29 +++++++++++++++++++ .../transforms/set_name.py | 20 +++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 taskcluster/kinds/mark-as-shipped/kind.yml create mode 100644 taskcluster/mozillavpn_taskgraph/transforms/set_name.py diff --git a/taskcluster/config.yml b/taskcluster/config.yml index 9d754aacf..b15a56b51 100644 --- a/taskcluster/config.yml +++ b/taskcluster/config.yml @@ -105,6 +105,11 @@ workers: implementation: beetmover-import-from-gcs-to-artifact-registry os: scriptworker worker-type: 'mozillavpn-{level}-beetmover' + shipit: + provisioner: scriptworker-k8s + implementation: scriptworker-shipit + os: scriptworker + worker-type: 'mozillavpn-{level}-shipit' succeed: provisioner: built-in implementation: succeed @@ -126,3 +131,6 @@ release-promotion: - fetch - toolchain - toolchain-openssl + +shipit: + scope-prefix: project:mozillavpn:releng:ship-it diff --git a/taskcluster/kinds/mark-as-shipped/kind.yml b/taskcluster/kinds/mark-as-shipped/kind.yml new file mode 100644 index 000000000..48f53911e --- /dev/null +++ b/taskcluster/kinds/mark-as-shipped/kind.yml @@ -0,0 +1,29 @@ +# 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 + - mozillavpn_taskgraph.transforms.set_name + - mozilla_taskgraph.transforms.scriptworker.shipit.mark_as_shipped + - taskgraph.transforms.task + +kind-dependencies: + - beetmover-ship + +tasks: + mark-as-shipped: + worker-type: shipit + from-deps: + group-by: + attribute: shipping-phase + copy-attributes: true + unique-kinds: false + set-name: false + shipit-product: + by-build-type: + addons/opt: mozilla-vpn-addons + default: mozilla-vpn-client + run-on-tasks-for: [action] diff --git a/taskcluster/mozillavpn_taskgraph/transforms/set_name.py b/taskcluster/mozillavpn_taskgraph/transforms/set_name.py new file mode 100644 index 000000000..628a9a64c --- /dev/null +++ b/taskcluster/mozillavpn_taskgraph/transforms/set_name.py @@ -0,0 +1,20 @@ +from taskgraph.transforms.base import TransformSequence +from taskgraph.util.dependencies import get_primary_dependency + + +transforms = TransformSequence() + + +@transforms.add +def set_name(config, tasks): + for task in tasks: + if config.kind == "mark-as-shipped": + dep = get_primary_dependency(config, task) + assert dep + + product = ( + "addons" if dep.attributes["build-type"] == "addons/opt" else "client" + ) + task["name"] = f"mark-as-shipped-{product}" + + yield task From ec29a9c3efbc23234fded9596f2bc0b88371b5fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 23:18:23 +0000 Subject: [PATCH 2/2] Bump translate-toolkit from 3.13.0 to 3.13.1 Bumps [translate-toolkit](https://github.com/translate/translate) from 3.13.0 to 3.13.1. - [Release notes](https://github.com/translate/translate/releases) - [Changelog](https://github.com/translate/translate/blob/master/docs/history.rst) - [Commits](https://github.com/translate/translate/compare/3.13.0...3.13.1) --- updated-dependencies: - dependency-name: translate-toolkit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 23427b775..b8f667503 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1055,9 +1055,9 @@ texttable==1.7.0 \ # via # aqtinstall # py7zr -translate-toolkit==3.13.0 \ - --hash=sha256:375e96e5af8a4942ed1f21ef70ae55c0435602e223eede2f0f4a14f2779e75c7 \ - --hash=sha256:d31a1191894d0ad4ed99697663f1462e9a1820af3bbcf6848235add20cc00e62 +translate-toolkit==3.13.1 \ + --hash=sha256:31e9d0e207c58c6d485a6c42898b26d875428e3d8bf0fb9c22a528c70829ac2e \ + --hash=sha256:4f1e56668dc01fb0967d8c6fee11984869353f849036c4b1a130db64eaf26730 # via -r requirements.in urllib3==2.0.7 \ --hash=sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84 \