This is a script that I use to emulate the workflow of launching a task from a hook registered in the Hook Manager on tools.taskcluster.net. By default, this will launch a task definition that will start a fennec nightly.
A hook will start a start a task using the current head of a repository. This is a painful process to work locally since you have to edit the task definition to get the correct revision for every launch.
This script will allow you to generate a task that refers to a revision that you push to try.
First set up a client in the Client
Manager. This client should be
able to generate create the task that you specify. For nightly fennec, refer to
the scopes under the hook-id:releng/nightly-fennec-dev
role.
Replace the credentials in the launch script. Replace the TASK_PATH
and
REPO_PATH
if neccesary.
Using a virtual environment, install the dependencies from the requirements.
$ virtualenv -p python3 venv
(venv)$ pip install -r requirements.txt
Before you run the script, you should change to the head that you want launch the task with. In your repository directory:
$ hg push -r . try -f
--force
is necessary if your head is on a local bookmark.
Then run the launch script. You can optionally specify a revision using
--rev
.
(venv)$ python launch.py