32
edits
(→Run the tasks to staging pools (OSX/Linux): add link to trychooser) |
(→Run the tasks to staging pools (OSX/Linux): changed to a diff/ hgpatch) |
||
| Line 284: | Line 284: | ||
* Add the following changes to taskcluster/taskgraph/transforms/task.py file: | * Add the following changes to taskcluster/taskgraph/transforms/task.py file: | ||
<pre> | <pre> | ||
@transforms.add | diff --git a/taskcluster/taskgraph/transforms/task.py b/taskcluster/taskgraph/transforms/task.py | ||
def replace_level_in_workertype(config, tasks): | --- a/taskcluster/taskgraph/transforms/task.py | ||
+++ b/taskcluster/taskgraph/transforms/task.py | |||
@@ -1582,16 +1582,44 @@ def add_index_routes(config, tasks): | |||
index_type = index.get('type', 'generic') | |||
task = index_builders[index_type](config, task) | |||
del task['index'] | |||
yield task | |||
@transforms.add | |||
+def replace_level_in_workertype(config, tasks): | |||
+ """ | |||
+ This transform replaces {level} in workerType name with actual scm level. | |||
+ """ | |||
+ for task in tasks: | |||
+ level = str(config.params['level']) | |||
+ task['worker-type'] = task['worker-type'].format(level=level) | |||
+ yield task | |||
+ | |||
+@transforms.add | |||
+def use_beta_workertypes(config, tasks): | |||
+ """ | |||
+ This transform uses a dictionary of worker type names to worker type names | |||
+ in order to map one set of worker types to another set. This is typically | |||
+ useful when you want to run a try push against a staging set of worker | |||
+ types, that you want to test before rolling them out to production. | |||
+ """ | |||
+ find_replace_dict = { | |||
+ "releng-hardware/gecko-t-linux64-talos": "releng-hardware/gecko-t-linux64-talos-b", | |||
+ } | |||
+ # This will replace releng-hardware/gecko-t-osx-1010 worker-type with releng-hardware/gecko-t-osx-1010-beta | |||
+ # for Linux, you will need to use releng-hardware/geck-t-linux-talos with releng-hardware/geck-t-linux-talos-b | |||
+ for task in tasks: | |||
+ if task['worker-type'] in find_replace_dict: | |||
+ task['worker-type'] = find_replace_dict[task['worker-type']] | |||
+ yield task | |||
+ | |||
+@transforms.add | |||
def build_task(config, tasks): | |||
for task in tasks: | |||
level = str(config.params['level']) | |||
worker_type = task['worker-type'].format(level=level) | |||
provisioner_id, worker_type = worker_type.split('/', 1) | |||
project = config.params['project'] | |||
routes = task.get('routes', []) | |||
</pre> | |||
* Commit the changes using the following commit message: hg commit -m "<commit_message>; try: -b do -p macosx64 -u all -t none". The <commit_message> will be a message that will describe your action, like: Run all tests on OSX staging workers. | |||
** To run different tests or on a different platform, use https://mozilla-releng.net/trychooser/ | |||
** Do _not_ run unnecessay tests or you may end up on the [https://catlee.github.io/highscores/highscores.html hiscore board]. | |||
* Push the changes into try repository: hg push -f -r . ssh://hg.mozilla.org/try | * Push the changes into try repository: hg push -f -r . ssh://hg.mozilla.org/try | ||
* You will receive an email like this: | * You will receive an email like this: | ||
<pre> | <pre> | ||
| Line 343: | Line 357: | ||
Summary: Test linux generic-worker; try: -b do -p linux64 -u none -t chromez-e10s | Summary: Test linux generic-worker; try: -b do -p linux64 -u none -t chromez-e10s | ||
</pre> | </pre> | ||
==== Notes ==== | |||
* A useful link for try syntax: https://mozilla-releng.net/trychooser/ | * A useful link for try syntax: https://mozilla-releng.net/trychooser/ | ||
* To see the hosts from the staging pool: | * To see the hosts from the staging pool: | ||
* OSX hosts: https://tools.taskcluster.net/provisioners/releng-hardware/worker-types/gecko-t-osx-1010-beta | * OSX hosts: https://tools.taskcluster.net/provisioners/releng-hardware/worker-types/gecko-t-osx-1010-beta | ||
* Linux hosts: https://tools.taskcluster.net/provisioners/releng-hardware/worker-types/gecko-t-linux-talos-b | * Linux hosts: https://tools.taskcluster.net/provisioners/releng-hardware/worker-types/gecko-t-linux-talos-b | ||
edits