View jsone-light.js
import _ from 'lodash';
import assert from 'assert';
// Render string given context
let renderString = (value, context) => {
return value.replace(/\${([^}]+)}/g, (expr, key) => {
if (context[key] === undefined) {
throw new Error('Undefined variable referenced in: ' + expr);
}
if (!_.includes(['number', 'string'], typeof(context[key]))) {
View actions-utils.js
import _ from 'lodash';
import Ajv from 'ajv';
import assert from 'assert';
import taskcluster from 'taskcluster-client';
let data = {}; // TODO: Load actions.json from decision task
if (data.version > 1) {
throw Error('Unsupported version of public/actions.json');
}
View actions-schema.yml
$schema: http://json-schema.org/draft-04/schema#
id: https://hg.mozilla.org/mozilla-central/raw-file/tip/taskcluster/docs/actions-schema.yml
title: Schema for Exposing Actions
description: |
This document specifies the schema for the `public/actions.json` used by
_decision tasks_ to expose actions that can be triggered by end-users.
For the purpose of this document the _consumer_ is the user-interface that
displays task results to the end-user and allows end-users to trigger actions
defined by `public/actions.json`. A _consumer_ might be Treeherder.
View simple-expression-language
{
// Save parse options as context
var context = options;
}
Expression
= _ e:LogicalExpression _ { return e; }
LogicalExpression
= l:ComparisonExpression _ '||' _ r:LogicalExpression { return l || r; }
View cot.json
{
"id": "http://schemas.taskcluster.net/common/v1/cot.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Chain of Trust Artifact",
"description": "COT-artifact for verfication of tasks",
"type": "object",
"properties": {
"chainOfTrustVersion": {"enum": [1]},
"artifacts": {
"additionalProperties": {
View README.md

How to use this

  1. Find a task on treeherder
  2. Use the "inspect-task" link to get to the task-inspector
  3. Use the "one-click-loaner" link to get a loaner task
  4. Click the taskId of the loaner task
  5. List artifacts
  6. Find "private/docker-worker/shell.html"
  7. Right click and copy URL (ensure that you are logged into the tools.taskcluster.net with an LDAP user with commit level 1)
View package.json
{
"private": true,
"dependencies": {
"docker-exec-websocket-server": "^1.3.1"
}
}
View package.json
{
"private": true,
"dependencies": {
"docker-exec-websocket-server": "^1.3.1"
}
}
View delete-s3-bucket-parallel.js
let aws = require('aws-sdk');
let bucket = '<BUCKET TO DELETE>';
let deleted = 0;
setInterval(function() {
console.log("Deleted: " + deleted);
}, 1000);
View lib-iterate-proposal.js
var Iterate = require(`./`);
// Define a poller operation using Iterate
let Poller = Iterate({
maxIterations: 0,
maxFailures: 7,
maxIterationTime: 45 * 1000,
minIterationTime: 0,
watchDog: 30 * 1000,
waitTime: 500,