summaryrefslogtreecommitdiffstats
path: root/security/nss/automation/taskcluster/graph/src/queue.js
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/automation/taskcluster/graph/src/queue.js')
-rw-r--r--security/nss/automation/taskcluster/graph/src/queue.js22
1 files changed, 18 insertions, 4 deletions
diff --git a/security/nss/automation/taskcluster/graph/src/queue.js b/security/nss/automation/taskcluster/graph/src/queue.js
index 2a4a7b3fe..29b570729 100644
--- a/security/nss/automation/taskcluster/graph/src/queue.js
+++ b/security/nss/automation/taskcluster/graph/src/queue.js
@@ -25,10 +25,18 @@ function fromNow(hours) {
}
function parseRoutes(routes) {
- return [
+ let rv = [
`tc-treeherder.v2.${process.env.TC_PROJECT}.${process.env.NSS_HEAD_REVISION}.${process.env.NSS_PUSHLOG_ID}`,
...routes
];
+
+ // Notify about failures (except on try).
+ if (process.env.TC_PROJECT != "nss-try") {
+ rv.push(`notify.email.${process.env.TC_OWNER}.on-failed`,
+ `notify.email.${process.env.TC_OWNER}.on-exception`);
+ }
+
+ return rv;
}
function parseFeatures(list) {
@@ -80,6 +88,7 @@ function parseTreeherder(def) {
}
function convertTask(def) {
+ let scopes = [];
let dependencies = [];
let env = merge({
@@ -110,12 +119,16 @@ function convertTask(def) {
payload.image = def.image;
}
+ if (def.artifacts) {
+ payload.artifacts = parseArtifacts(def.artifacts);
+ }
+
if (def.features) {
payload.features = parseFeatures(def.features);
- }
- if (def.artifacts) {
- payload.artifacts = parseArtifacts(def.artifacts);
+ if (payload.features.allowPtrace) {
+ scopes.push("docker-worker:feature:allowPtrace");
+ }
}
return {
@@ -123,6 +136,7 @@ function convertTask(def) {
workerType: def.workerType || "hg-worker",
schedulerId: "task-graph-scheduler",
+ scopes,
created: fromNow(0),
deadline: fromNow(24),