upload_symbols.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # This Source Code Form is subject to the terms of the Mozilla Public
  2. # License, v. 2.0. If a copy of the MPL was not distributed with this
  3. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  4. """
  5. Transform the upload-symbols task description template,
  6. taskcluster/ci/upload-symbols/job-template.yml
  7. into an actual task description.
  8. """
  9. from __future__ import absolute_import, print_function, unicode_literals
  10. from taskgraph.transforms.base import TransformSequence
  11. transforms = TransformSequence()
  12. @transforms.add
  13. def fill_template(config, tasks):
  14. for task in tasks:
  15. # Fill out the dynamic fields in the task description
  16. task['label'] = task['build-label'] + '-upload-symbols'
  17. task['dependencies'] = {'build': task['build-label']}
  18. task['worker']['env']['GECKO_HEAD_REPOSITORY'] = config.params['head_repository']
  19. task['worker']['env']['GECKO_HEAD_REV'] = config.params['head_rev']
  20. build_platform, build_type = task['build-platform'].split('/')
  21. attributes = task.setdefault('attributes', {})
  22. attributes['build_platform'] = build_platform
  23. attributes['build_type'] = build_type
  24. # clear out the stuff that's not part of a task description
  25. del task['build-label']
  26. del task['build-platform']
  27. yield task