Skip to content

Commit

Permalink
Build FXIOS-8134 [v123] Add a test to catch Taskgraph generation fail…
Browse files Browse the repository at this point in the history
…ures
  • Loading branch information
ahal committed Jan 12, 2024
1 parent 8c467ab commit a2460bc
Show file tree
Hide file tree
Showing 7 changed files with 177 additions and 0 deletions.
29 changes: 29 additions & 0 deletions taskcluster/docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM alpine:3.19.0

# Add worker user
RUN mkdir /builds && \
adduser -h /builds/worker -s /bin/ash -D worker && \
mkdir /builds/worker/artifacts && \
chown worker:worker /builds/worker/artifacts

# Update repositories
RUN apk update

# Setup Python
RUN apk add --no-cache python3 py3-pip py3-setuptools && \
ln -sf python3 /usr/bin/python

# Setup other dependencies
RUN apk add bash git

# %include-run-task

ENV SHELL=/bin/ash \
HOME=/builds/worker \
PATH=/builds/worker/.local/bin:$PATH

VOLUME /builds/worker/checkouts
VOLUME /builds/worker/.cache

# Set a default command useful for debugging
CMD ["/bin/ash"]
2 changes: 2 additions & 0 deletions taskcluster/kinds/docker-image/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ transforms:
- taskgraph.transforms.task:transforms

tasks:
linux:
symbol: I(linux)
screenshots:
symbol: I(screenshots)
36 changes: 36 additions & 0 deletions taskcluster/kinds/test/kind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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.run:transforms
- taskgraph.transforms.task:transforms

tasks:
taskgraph-definition:
worker-type: misc
worker:
docker-image: {in-tree: alpine}
max-run-time: 1800
description: "Test the full `firefox_ios_taskgraph` to validate the latest changes"
treeherder:
symbol: test-taskgraph-definition
kind: test
platform: tests/opt
tier: 1
run:
using: run-task
use-caches: true
cwd: '{checkout}'
command: >-
pip3 install --break-system-packages -r taskcluster/requirements.txt &&
for param in `ls taskcluster/test/params`; do
taskgraph full -p taskcluster/test/params/$param
done &&
taskgraph full
when:
files-changed:
- taskcluster/**
27 changes: 27 additions & 0 deletions taskcluster/test/params/cron-bitrise-performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
base_ref: origin/main
base_repository: https://github.com/mozilla-mobile/firefox-ios
base_rev: 0c4aebc542bf79294eab9bd485b1038676edd41c
build_date: 1705010615
build_number: 1
do_not_optimize: []
enable_always_target: true
existing_tasks: {}
filters:
- target_tasks_method
head_ref: main
head_repository: https://github.com/mozilla-mobile/firefox-ios
head_rev: 0c4aebc542bf79294eab9bd485b1038676edd41c
head_tag: ''
level: '3'
moz_build_date: '20240111220335'
next_version: null
optimize_strategies: null
optimize_target_tasks: true
owner: cron@noreply.mozilla.org
project: firefox-ios
pushdate: 0
pushlog_id: '0'
repository_type: git
target_tasks_method: bitrise_performance_test
tasks_for: cron
version: null
27 changes: 27 additions & 0 deletions taskcluster/test/params/cron-firebase-performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
base_ref: origin/main
base_repository: https://github.com/mozilla-mobile/firefox-ios
base_rev: 0c4aebc542bf79294eab9bd485b1038676edd41c
build_date: 1705010623
build_number: 1
do_not_optimize: []
enable_always_target: true
existing_tasks: {}
filters:
- target_tasks_method
head_ref: main
head_repository: https://github.com/mozilla-mobile/firefox-ios
head_rev: 0c4aebc542bf79294eab9bd485b1038676edd41c
head_tag: ''
level: '3'
moz_build_date: '20240111220343'
next_version: null
optimize_strategies: null
optimize_target_tasks: true
owner: cron@noreply.mozilla.org
project: firefox-ios
pushdate: 0
pushlog_id: '0'
repository_type: git
target_tasks_method: firebase_performance_test
tasks_for: cron
version: null
28 changes: 28 additions & 0 deletions taskcluster/test/params/main-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
base_ref: origin/main
base_repository: https://github.com/mozilla-mobile/firefox-ios
base_rev: 8c467abc51884d19f5aebf42568ae8cc6abae1e5
build_date: 1705084000
build_number: 1
do_not_optimize: []
enable_always_target: true
existing_tasks: {}
filters:
- target_tasks_method
head_ref: refs/heads/main
head_repository: https://github.com/mozilla-mobile/firefox-ios
head_rev: 8c467abc51884d19f5aebf42568ae8cc6abae1e5
head_tag: ''
level: '3'
moz_build_date: '20240112182640'
next_version: null
optimize_strategies: null
optimize_target_tasks: true
owner: user@example.com
project: firefox-ios
pushdate: 0
pushlog_id: '0'
repository_type: git
target_tasks_method: default
tasks_for: github-push
version: null
28 changes: 28 additions & 0 deletions taskcluster/test/params/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
base_ref: origin/main
base_repository: https://github.com/mozilla-mobile/firefox-ios
base_rev: 5e2f895864cf58861aea2d5232162ce2f2d5db98
build_date: 1704987940
build_number: 1
do_not_optimize: []
enable_always_target: true
existing_tasks: {}
filters:
- target_tasks_method
head_ref: taskgraph_v7
head_repository: https://github.com/user/firefox-ios
head_rev: 09b1ef3c02bdbb6d96a02e2cbd68c70e6bb1d105
head_tag: ''
level: '1'
moz_build_date: '20240111154540'
next_version: null
optimize_strategies: null
optimize_target_tasks: true
owner: user@example.com
project: firefox-ios
pushdate: 0
pushlog_id: '0'
repository_type: git
target_tasks_method: default
tasks_for: github-pull-request
version: null

0 comments on commit a2460bc

Please sign in to comment.