Bug 1274350 - Add more TreeHerder configuration for jobs r=me
authorTim Taubert <ttaubert@mozilla.com>
Tue, 24 May 2016 18:15:49 +0200
changeset 12190 28b6ffba23711a2a10f59c4bd7c8e1e9f274c603
parent 12189 01d3dc78d4a2bedd839e62888bea5d0267da3205
child 12191 6d52e8a2eb15d0a2790ab9466bbd343d19c401df
push id1241
push userttaubert@mozilla.com
push dateTue, 24 May 2016 16:17:12 +0000
reviewersme
bugs1274350
Bug 1274350 - Add more TreeHerder configuration for jobs r=me
.taskcluster.yml
automation/taskcluster/graph/build.js
automation/taskcluster/graph/graph.yml
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -64,16 +64,18 @@ tasks:
         - "tc-treeherder.nss.{{revision_hash}}"
 
       payload:
         image: "ttaubert/nss-ci:0.0.13"
 
         env:
           TC_OWNER: {{owner}}
           TC_SOURCE: {{{source}}}
+          TC_REVISION: '{{revision}}'
+          TC_REVISION_HASH: '{{revision_hash}}'
           TC_DOCKER_IMAGE: "ttaubert/nss-ci:0.0.13"
           TC_PROVISIONER_ID: "aws-provisioner-v1"
           TC_WORKER_TYPE: "hg-worker"
           NSS_HEAD_REPOSITORY: '{{{url}}}'
           NSS_HEAD_REVISION: '{{revision}}'
 
         features:
           taskclusterProxy: true
--- a/automation/taskcluster/graph/build.js
+++ b/automation/taskcluster/graph/build.js
@@ -23,21 +23,30 @@ function from_now(hours) {
 
 // TODO
 function build_task(id, def) {
   var task, retvals = [{
     taskId: taskid(id),
     task: task = {
       payload: {
         image: process.env.TC_DOCKER_IMAGE,
-        maxRunTime: 3600
+        maxRunTime: 3600,
+        features: {
+          taskclusterProxy: true
+        }
       },
       metadata: {
         owner: process.env.TC_OWNER,
         source: process.env.TC_SOURCE
+      },
+      extra: {
+        treeherder: {
+          revision: process.env.TC_REVISION,
+          revision_hash: process.env.TC_REVISION_HASH
+        }
       }
     }
   }];
 
   // Fill in some basic data.
   task.created = from_now(0);
   task.deadline = from_now(24);
   task.provisionerId = process.env.TC_PROVISIONER_ID || "aws-provisioner-v1";
@@ -60,16 +69,17 @@ function build_task(id, def) {
     }
   }
 
   // Fill in attributes.
   task.metadata.name = def.name;
   task.metadata.description = def.description;
   task.payload.command = def.command;
   task.payload.env = def.env || {};
+  task.extra.treeherder = merge.recursive(true, task.extra.treeherder, def.treeherder || {});
 
   // Forward some GitHub env variables.
   task.payload.env.NSS_HEAD_REPOSITORY = process.env.NSS_HEAD_REPOSITORY;
   task.payload.env.NSS_HEAD_REVISION = process.env.NSS_HEAD_REVISION;
 
   // Register artifacts.
   if (def.artifact) {
     task.payload.artifacts = {
--- a/automation/taskcluster/graph/graph.yml
+++ b/automation/taskcluster/graph/graph.yml
@@ -185,70 +185,94 @@ templates:
       NSS_TESTS: "tools"
 
 graph:
   build-32-debug-asan-gcc5:
     name: "Linux 32 (gcc5, debug, ASan)"
     extends: builder
     env:
       USE_ASAN: 1
+    treeherder:
+      symbol: B
+      machine:
+        platform: linux32
+      collection:
+        debug: true
 
   build-32-opt-gcc5:
     name: "Linux 32 (gcc5, opt)"
     extends: builder
     env:
       BUILD_OPT: 1
+    treeherder:
+      symbol: B
+      machine:
+        platform: linux32
 
   build-64-debug-asan-gcc5:
     name: "Linux 64 (gcc5, debug, ASan)"
     extends: builder
     env:
       USE_ASAN: 1
       USE_64: 1
+    treeherder:
+      symbol: B
+      machine:
+        platform: linux64
+      collection:
+        debug: true
 
   build-64-opt-gcc5:
     name: "Linux 64 (gcc5, opt)"
     extends: builder
     env:
       BUILD_OPT: 1
       USE_64: 1
+    treeherder:
+      symbol: B
+      machine:
+        platform: linux64
 
-  build-32-debug-asan-gcc6:
-    name: "Linux 32 (gcc6, debug, ASan)"
-    extends: builder
-    env:
-      USE_ASAN: 1
-      CCC: g++-6
-      CC: gcc-6
-
-  build-32-opt-gcc6:
-    name: "Linux 32 (gcc6, opt)"
-    extends: builder
-    env:
-      BUILD_OPT: 1
-      CCC: g++-6
-      CC: gcc-6
+# build-32-debug-asan-gcc6:
+#   name: "Linux 32 (gcc6, debug, ASan)"
+#   extends: builder
+#   env:
+#     USE_ASAN: 1
+#     CCC: g++-6
+#     CC: gcc-6
 
-  build-64-debug-asan-gcc6:
-    name: "Linux 64 (gcc6, debug, ASan)"
-    extends: builder
-    env:
-      USE_ASAN: 1
-      USE_64: 1
-      CCC: g++-6
-      CC: gcc-6
+# build-32-opt-gcc6:
+#   name: "Linux 32 (gcc6, opt)"
+#   extends: builder
+#   env:
+#     BUILD_OPT: 1
+#     CCC: g++-6
+#     CC: gcc-6
 
-  build-64-opt-gcc6:
-    name: "Linux 64 (gcc6, opt)"
-    extends: builder
-    env:
-      BUILD_OPT: 1
-      USE_64: 1
-      CCC: g++-6
-      CC: gcc-6
+# build-64-debug-asan-gcc6:
+#   name: "Linux 64 (gcc6, debug, ASan)"
+#   extends: builder
+#   env:
+#     USE_ASAN: 1
+#     USE_64: 1
+#     CCC: g++-6
+#     CC: gcc-6
+
+# build-64-opt-gcc6:
+#   name: "Linux 64 (gcc6, opt)"
+#   extends: builder
+#   env:
+#     BUILD_OPT: 1
+#     USE_64: 1
+#     CCC: g++-6
+#     CC: gcc-6
 
   clang-format:
     name: "NSS | clang-format-3.8"
     description: "Validate source code formatting"
     command:
       - "/bin/bash"
       - "-c"
       - "bin/checkout.sh && nss/automation/taskcluster/scripts/run_clang_format.sh nss/lib/ssl"
+    treeherder:
+      symbol: cf
+      machine:
+        platform: clang-format