.taskcluster.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # This file is rendered via JSON-e in a hook with context:
  2. # {
  3. # tasks_for: 'hg-push',
  4. # push: {owner, pushlog_id, pushdate},
  5. # repository: {url, project, level},
  6. # now,
  7. # ownTaskId: // taskId of the task that will be created
  8. # }
  9. ---
  10. version: 1
  11. tasks:
  12. - $let:
  13. # sometimes the push user is just `ffxbld` or the like, but we want an
  14. # email-like field..
  15. ownerEmail:
  16. $if: '"@" in push.owner'
  17. then: '${push.owner}'
  18. else: '${push.owner}@noreply.mozilla.org'
  19. # ensure there's no trailing `/` on the repo URL
  20. repoUrl:
  21. $if: 'repository.url[-1] == "/"'
  22. then: {$eval: 'repository.url[:-1]'}
  23. else: {$eval: 'repository.url'}
  24. # scheduler id
  25. schedulerId: 'nss-level-${repository.level}'
  26. in:
  27. taskId: '${ownTaskId}'
  28. taskGroupId: '${ownTaskId}'
  29. schedulerId: '${schedulerId}'
  30. created: {$fromNow: ''}
  31. deadline: {$fromNow: '1 day'}
  32. expires: {$fromNow: '14 days'}
  33. metadata:
  34. owner: mozilla-taskcluster-maintenance@mozilla.com
  35. source: "${repository.url}"
  36. name: "NSS Decision Task"
  37. description: |
  38. The task that creates all of the other tasks in the task graph
  39. workerType: "linux"
  40. provisionerId: "nss-${repository.level}"
  41. scopes:
  42. - 'assume:repo:${repoUrl[8:]}:branch:default'
  43. tags:
  44. createdForUser: "${ownerEmail}"
  45. routes:
  46. - "tc-treeherder-stage.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
  47. - "tc-treeherder.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
  48. payload:
  49. # TODO: use nssdev org , not djmitche, once the image is pushed there
  50. image: djmitche/nss-decision:0.0.3
  51. env:
  52. TC_OWNER: "${ownerEmail}"
  53. TC_SOURCE: "${repository.url}"
  54. TC_PROJECT: ${repository.project}
  55. TC_SCHEDULER_ID: "${schedulerId}"
  56. MOZ_SCM_LEVEL: "${repository.level}"
  57. NSS_PUSHLOG_ID: '${push.pushlog_id}'
  58. NSS_HEAD_REPOSITORY: '${repository.url}'
  59. NSS_HEAD_REVISION: '${push.revision}'
  60. maxRunTime: 1800
  61. command:
  62. - bash
  63. - -cx
  64. - >
  65. bin/checkout.sh &&
  66. nss/automation/taskcluster/scripts/extend_task_graph.sh
  67. features:
  68. taskclusterProxy: true
  69. extra:
  70. treeherder:
  71. symbol: D
  72. build:
  73. platform: nss-decision
  74. machine:
  75. platform: nss-decision