Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 36 additions & 7 deletions taskcluster/kinds/docker-image/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,30 @@ transforms:
- taskgraph.transforms.cached_tasks:transforms
- taskgraph.transforms.task:transforms

meta:
- &py311 "3.11.9"
- &py314 "3.14.3"
- &uv_version "0.7.15"

tasks:
python311:
definition: base-test
args:
PYTHON_VERSION: "3.11.9"
UV_VERSION: "0.7.15"
PYTHON_VERSION: *py311
UV_VERSION: *uv_version
python314:
definition: base-test
args:
PYTHON_VERSION: *py314
UV_VERSION: *uv_version

# Used by push-image kind
skopeo: {}

base:
args:
PYTHON_VERSION: "3.11.9"
UV_VERSION: "0.7.15"
PYTHON_VERSION: *py311
UV_VERSION: *uv_version
addonscript:
definition: script
parent: base
Expand Down Expand Up @@ -84,18 +94,37 @@ tasks:
pushapkscript-test-py311:
definition: base-test
args:
PYTHON_VERSION: "3.11.9"
PYTHON_VERSION: *py311
APT_PACKAGES: default-jdk

pushflatpakscript-test-py311:
definition: base-test
args:
PYTHON_VERSION: "3.11.9"
PYTHON_VERSION: *py311
# Copied from pushflatpakscript/docker.d/image_setup.sh
APT_PACKAGES: gir1.2-ostree-1.0 libgirepository1.0-dev ostree

signingscript-test-py311:
definition: base-test
args:
PYTHON_VERSION: "3.11.9"
PYTHON_VERSION: *py311
APT_PACKAGES: osslsigncode cmake clang

pushapkscript-test-py314:
definition: base-test
args:
PYTHON_VERSION: *py314
APT_PACKAGES: default-jdk

pushflatpakscript-test-py314:
definition: base-test
args:
PYTHON_VERSION: *py314
# Copied from pushflatpakscript/docker.d/image_setup.sh
APT_PACKAGES: gir1.2-ostree-1.0 libgirepository1.0-dev ostree

signingscript-test-py314:
definition: base-test
args:
PYTHON_VERSION: *py314
APT_PACKAGES: osslsigncode cmake clang
36 changes: 11 additions & 25 deletions taskcluster/kinds/tox/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,73 +8,68 @@ kind-dependencies:
- docker-image

transforms:
- scriptworker_taskgraph.transforms.python_version:transforms
- scriptworker_taskgraph.transforms.replace_name:transforms
- taskgraph.transforms.matrix
- scriptworker_taskgraph.transforms.cached:transforms
- taskgraph.transforms.cached_tasks:transforms
- taskgraph.transforms.run:transforms
- taskgraph.transforms.task:transforms

task-defaults:
description: "{name} tox-py{python_version}"
description: "{name} tox-py{{matrix[python]}}"
run-on-tasks-for:
- "github-pull-request"
- "github-push"
attributes:
code-review: true
worker-type: b-linux
worker:
docker-image: {in-tree: 'python{python_version}'}
docker-image: {in-tree: 'python{matrix[python]}'}
max-run-time: 1800
run:
using: run-task
checkout:
scriptworker: {}
# sparse-profile: str/none
# workdir:
cwd: '{checkout}'
cwd: '{{checkout}}'
command:
- sh
- -lxce
- >-
uv run tox -e {name}-py{python_version}
uv run tox -e {name}-py{{matrix[python]}}
resources:
- pyproject.toml
- tox.ini
- uv.lock
matrix:
python: ["311", "314"]

tasks:
addonscript:
python-versions: [311]
resources:
- addonscript
balrogscript:
python-versions: [311]
resources:
- balrogscript
- scriptworker_client
beetmoverscript:
python-versions: [311]
resources:
- beetmoverscript
bitrisescript:
python-versions: [311]
resources:
- bitrisescript
bouncerscript:
python-versions: [311]
resources:
- bouncerscript
configloader:
python-versions: [311]
resources:
- configloader
githubscript:
python-versions: [311]
resources:
- githubscript
- scriptworker_client
init:
python-versions: [311]
resources:
- docker.d
- addonscript/docker.d
Expand All @@ -91,49 +86,40 @@ tasks:
- signingscript/docker.d
- treescript/docker.d
iscript:
python-versions: [311]
resources:
- iscript
- scriptworker_client
- vendored/mozbuild
landoscript:
python-versions: [311]
resources:
- landoscript
- scriptworker_client
pushapkscript:
python-versions: [311]
worker:
docker-image: {in-tree: 'pushapkscript-test-py{python_version}'}
docker-image: {in-tree: 'pushapkscript-test-py{matrix[python]}'}
resources:
- pushapkscript
pushflatpakscript:
python-versions: [311]
worker:
docker-image: {in-tree: 'pushflatpakscript-test-py{python_version}'}
docker-image: {in-tree: 'pushflatpakscript-test-py{matrix[python]}'}
resources:
- pushflatpakscript
pushmsixscript:
python-versions: [311]
resources:
- pushmsixscript
scriptworker_client:
python-versions: [311]
resources:
- scriptworker_client
shipitscript:
python-versions: [311]
resources:
- shipitscript
signingscript:
python-versions: [311]
worker:
docker-image: {in-tree: 'signingscript-test-py{python_version}'}
docker-image: {in-tree: 'signingscript-test-py{matrix[python]}'}
resources:
- signingscript
- vendored/mozbuild
treescript:
python-versions: [311]
resources:
- treescript
- scriptworker_client
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 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/.
"""
Create a task per python-version
Substitute task name in other fields
"""

from copy import deepcopy
Expand Down Expand Up @@ -53,26 +53,14 @@ def set_script_name(config, tasks):


@transforms.add
def tasks_per_python_version(config, tasks):
def replace_name(config, tasks):
fields = [
"description",
"docker-repo",
"run.command",
"worker.command",
"worker.docker-image",
]
for task_raw in tasks:
for python_version in task_raw.pop("python-versions"):
task = deepcopy(task_raw)
subs = {"name": task["name"], "python_version": python_version}
for field in fields:
_resolve_replace_string(task, field, subs)
task["attributes"]["python-version"] = python_version
yield task


@transforms.add
def update_name_with_python_version(config, tasks):
for task in tasks:
task["name"] = "{}-python{}".format(task["name"], task["attributes"]["python-version"])
task = deepcopy(task_raw)
subs = {"name": task["name"]}
for field in fields:
_resolve_replace_string(task, field, subs)
yield task
84 changes: 84 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,90 @@ changedir = {toxinidir}/treescript
commands =
tox -e py311

[testenv:addonscript-py314]
changedir = {toxinidir}/addonscript
commands =
tox -e py314

[testenv:balrogscript-py314]
changedir = {toxinidir}/balrogscript
commands =
tox -e py314

[testenv:beetmoverscript-py314]
changedir = {toxinidir}/beetmoverscript
commands =
tox -e py314

[testenv:bitrisescript-py314]
changedir = {toxinidir}/bitrisescript
commands =
tox -e py314

[testenv:bouncerscript-py314]
changedir = {toxinidir}/bouncerscript
commands =
tox -e py314

[testenv:configloader-py314]
changedir = {toxinidir}/configloader
commands =
tox -e py314

[testenv:init-py314]
commands =
pytest -n auto tests

[testenv:iscript-py314]
changedir = {toxinidir}/iscript
commands =
tox -e py314

[testenv:githubscript-py314]
changedir = {toxinidir}/githubscript
commands =
tox -e py314

[testenv:landoscript-py314]
changedir = {toxinidir}/landoscript
commands =
tox -e py314

[testenv:pushapkscript-py314]
changedir = {toxinidir}/pushapkscript
commands =
tox -e py314

[testenv:pushflatpakscript-py314]
changedir = {toxinidir}/pushflatpakscript
commands =
tox -e py314

[testenv:pushmsixscript-py314]
changedir = {toxinidir}/pushmsixscript
commands =
tox -e py314

[testenv:scriptworker_client-py314]
changedir = {toxinidir}/scriptworker_client
commands =
tox -e py314,mypy

[testenv:shipitscript-py314]
changedir = {toxinidir}/shipitscript
commands =
tox -e py314

[testenv:signingscript-py314]
changedir = {toxinidir}/signingscript
commands =
tox -e py314

[testenv:treescript-py314]
changedir = {toxinidir}/treescript
commands =
tox -e py314

[testenv:ruff-py311]
commands =
ruff --version
Expand Down