taskcluster / taskcluster-tools

Tools for debugging, inspecting and managing Taskcluster
https://tools.taskcluster.net/
Mozilla Public License 2.0
26 stars 91 forks source link

Taskcluster Tools

This repository contains a collection of useful tools for use with Taskcluster. Generally, we strive to not add UI to Taskcluster components, but instead offer well documented APIs that can be easily consumed using a client library for Taskcluster.

Developing Taskcluster Tools

Prerequisites for building Taskcluster Tools

Building

First, fork this repository to another GitHub account. Then you can clone and install:

git clone https://github.com/<YOUR_ACCOUNT>/taskcluster-tools.git
cd taskcluster-tools
yarn

Code Organization

Tasks and Configuration

Building this project uses Neutrino, neutrino-preset-frontend-infra to:

Testing changes

Install npm dependencies and start it up:

This will start a local development server on port 9000 (http://localhost:9000).

Any ESLint errors across the project will be displayed in the terminal during development.

Available targets

Memory problems during development

It's possible that when building a larger project like taskcluster-tools that Node.js will run out of memory for the amount of files being built during development. As a workaround, instead of running yarn start, run the following to run the same command with more memory:

node --max-old-space-size=4096 node_modules/.bin/neutrino start

You may need to adjust the memory size to your machine specs accordingly.

Testing

Until someone comes up with something better, all testing is manual. Open the tools and check that they work. :)

Ngrok Setup (optional)

Ngrok allows you to expose a web server running on your local machine to the internet. Ngrok is used to create an https connection, so that you can login to the taskcluster-tools. For using ngrok:

Note: You have to run ngrok in a separate terminal/console.

Deployment

Taskcluster uses Travis to automatically deploy the Heroku application after a successful build on master. This is done in .travis.yml:

deploy:
  provider: heroku
  api_key:
    secure: "<your encrypted API key>"

If a deployment results in the site throwing a 404, try updating the API key. A non valid key will not deploy properly.

Encrypting a key