.taskcluster.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. ---
  2. version: 0
  3. metadata:
  4. name: 'Taskcluster tasks for Gecko'
  5. description: "The taskcluster task graph for Gecko trees"
  6. owner: mozilla-taskcluster-maintenance@mozilla.com
  7. source: {{{source}}}
  8. scopes:
  9. # Note the below scopes are insecure however these get overriden on the server
  10. # side to whatever scopes are set by mozilla-taskcluster.
  11. - queue:*
  12. - docker-worker:*
  13. - scheduler:*
  14. # Available mustache parameters (see the mozilla-taskcluster source):
  15. #
  16. # - owner: push user (email address)
  17. # - source: URL of this YAML file
  18. # - url: repository URL
  19. # - project: alias for the destination repository (basename of
  20. # the repo url)
  21. # - level: SCM level of the destination repository
  22. # (1 = try, 3 = core)
  23. # - revision: (short) hg revision of the head of the push
  24. # - revision_hash: (long) hg revision of the head of the push
  25. # - comment: comment of the push
  26. # - pushlog_id: id in the pushlog table of the repository
  27. #
  28. # and functions:
  29. # - as_slugid: convert a label into a slugId
  30. # - from_now: generate a timestamp at a fixed offset from now
  31. # The resulting tasks' taskGroupId will be equal to the taskId of the first
  32. # task listed here, which should be the decision task. This gives other tools
  33. # an easy way to determine the ID of the decision task that created a
  34. # particular group.
  35. tasks:
  36. - taskId: '{{#as_slugid}}decision task{{/as_slugid}}'
  37. task:
  38. created: '{{now}}'
  39. deadline: '{{#from_now}}1 day{{/from_now}}'
  40. expires: '{{#from_now}}365 day{{/from_now}}'
  41. metadata:
  42. owner: mozilla-taskcluster-maintenance@mozilla.com
  43. source: {{{source}}}
  44. name: "Gecko Decision Task"
  45. description: |
  46. The task that creates all of the other tasks in the task graph
  47. workerType: "gecko-decision"
  48. provisionerId: "aws-provisioner-v1"
  49. tags:
  50. createdForUser: {{owner}}
  51. scopes:
  52. # Bug 1269443: cache scopes, etc. must be listed explicitly
  53. - "docker-worker:cache:level-{{level}}-*"
  54. - "docker-worker:cache:tooltool-cache"
  55. # mozilla-taskcluster will append the appropriate assume:repo:<repo>
  56. # scope here.
  57. routes:
  58. - "index.gecko.v2.{{project}}.latest.firefox.decision"
  59. - "tc-treeherder.v2.{{project}}.{{revision}}.{{pushlog_id}}"
  60. - "tc-treeherder-stage.v2.{{project}}.{{revision}}.{{pushlog_id}}"
  61. payload:
  62. env:
  63. # checkout-gecko uses these to check out the source; the inputs
  64. # to `mach taskgraph decision` are all on the command line.
  65. GECKO_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-unified'
  66. GECKO_HEAD_REPOSITORY: '{{{url}}}'
  67. GECKO_HEAD_REF: '{{revision}}'
  68. GECKO_HEAD_REV: '{{revision}}'
  69. HG_STORE_PATH: /home/worker/checkouts/hg-store
  70. cache:
  71. level-{{level}}-checkouts: /home/worker/checkouts
  72. features:
  73. taskclusterProxy: true
  74. chainOfTrust: true
  75. # Note: This task is built server side without the context or tooling that
  76. # exist in tree so we must hard code the version
  77. image: 'taskcluster/decision:0.1.7'
  78. maxRunTime: 1800
  79. # TODO use mozilla-unified for the base repository once the tc-vcs
  80. # tar.gz archives are created or tc-vcs isn't being used.
  81. command:
  82. - /home/worker/bin/run-task
  83. - '--vcs-checkout=/home/worker/checkouts/gecko'
  84. - '--'
  85. - bash
  86. - -cx
  87. - >
  88. cd /home/worker/checkouts/gecko &&
  89. ln -s /home/worker/artifacts artifacts &&
  90. ./mach --log-no-times taskgraph decision
  91. --pushlog-id='{{pushlog_id}}'
  92. --pushdate='{{pushdate}}'
  93. --project='{{project}}'
  94. --message={{#shellquote}}{{{comment}}}{{/shellquote}}
  95. --owner='{{owner}}'
  96. --level='{{level}}'
  97. --base-repository='https://hg.mozilla.org/mozilla-central'
  98. --head-repository='{{{url}}}'
  99. --head-ref='{{revision}}'
  100. --head-rev='{{revision}}'
  101. --revision-hash='{{revision_hash}}'
  102. artifacts:
  103. 'public':
  104. type: 'directory'
  105. path: '/home/worker/artifacts'
  106. expires: '{{#from_now}}364 days{{/from_now}}'
  107. extra:
  108. treeherder:
  109. symbol: D