Skip to content

Commit

Permalink
Use 'release_promotion' action from mozilla-taskgraph (#8850)
Browse files Browse the repository at this point in the history
This is the same functionality, just moving code around so:

1. We only need to maintain it in a single place
2. VPN benefits from bug fixes / improvements from other repos
  • Loading branch information
ahal authored Jan 2, 2024
1 parent 8a123dd commit 8b0a0d1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 138 deletions.
24 changes: 19 additions & 5 deletions taskcluster/mozillavpn_taskgraph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from importlib import import_module

from taskgraph.util import schema
from mozilla_taskgraph import register as register_mozilla_taskgraph
from mozilla_taskgraph.actions import enable_action

schema.EXCEPTED_SCHEMA_IDENTIFIERS.append(
lambda path: any(
Expand All @@ -13,14 +15,26 @@
)


RELEASE_PROMOTION_PROJECTS = (
"https://github.com/mozilla-mobile/mozilla-vpn-client",
"https://github.com/mozilla-releng/staging-mozilla-vpn-client",
)


def is_relpro_available(parameters):
return parameters["head_repository"] in RELEASE_PROMOTION_PROJECTS


def register(graph_config):
"""
Import all modules that are siblings of this one, triggering decorators in
the process.
"""
"""Setup for task generation."""
# Setup mozilla-taskgraph
register_mozilla_taskgraph(graph_config)
# Enable the relpro action from mozilla-taskgraph
enable_action("release-promotion", available=is_relpro_available)

# Import sibling modules, triggering decorators in the process
_import_modules(
[
"actions.release_promotion",
"job",
"parameters",
"target_tasks",
Expand Down
Empty file.
132 changes: 0 additions & 132 deletions taskcluster/mozillavpn_taskgraph/actions/release_promotion.py

This file was deleted.

2 changes: 1 addition & 1 deletion taskcluster/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# https://taskcluster-taskgraph.readthedocs.io/en/latest/howto/bootstrap-taskgraph.html

taskcluster-taskgraph >= 7.0.2
mozilla-taskgraph >= 1.0.2
mozilla-taskgraph >= 1.1.0

0 comments on commit 8b0a0d1

Please sign in to comment.