.taskcluster.yml
author Gregory Szorc <gps@mozilla.com>
Wed, 14 Jun 2017 16:52:55 -0700
changeset 364238 398d9d49677547b1b9f106370858c925de8c1511
parent 353693 5748607f3014e8cec573fccebce5dcbf83b6ffd6
child 368536 3657315109760f0028a18ebb6ce614ffd9f761a3
permissions -rw-r--r--
Bug 1371465 - Move MSVS_VERSION to moz.configure and properly define for vs2017; r=glandium Before, MSVS was set in old-configure and could only be unset or "2015." We move the definition of the variable to moz.configure and support defining its value as "2017" when VS2017 is being used. As part of this, I discovered that GYP barfs with a "2017" value. This is likely a limitation of the legacy version of GYP we have vendored. Rather than go down the rabbit hole of upgrading GYP, I added code to convert the value to "2015." This preserves existing behavior and unblocks us from setting MSVS_VERSION properly. A warning is emitted to remind us to remove this hack once GYP is upgraded. After this commit, we now generate native VS2017 solutions and projects when building with VS2017. MozReview-Commit-ID: BvNJX3F8qCn

---
version: 0
metadata:
  name: 'Taskcluster tasks for Gecko'
  description: "The taskcluster task graph for Gecko trees"
  owner: mozilla-taskcluster-maintenance@mozilla.com
  source: {{{source}}}

scopes:
  # Note the below scopes are insecure however these get overriden on the server
  # side to whatever scopes are set by mozilla-taskcluster.
  - queue:*
  - docker-worker:*
  - scheduler:*

# This file undergoes substitution to create tasks.  For on-push tasks, that
# substitution is done by mozilla-taskcluster.  For cron tasks, that substitution
# is done by `taskcluster/taskgraph/cron/decision.py`.  If you change any of the
# template parameters, please do so in all three places!
#
# Available template parameters:
#
# - now:            current time
# - owner:          push user (email address)
# - source:         URL of this YAML file
# - url:            repository URL
# - project:        alias for the destination repository (basename of
#                   the repo url)
# - level:          SCM level of the destination repository
#                   (1 = try, 3 = core)
# - revision:       hg revision of the head of the push
# - comment:        comment of the push
# - pushlog_id:     id in the pushlog table of the repository
#
# and functions:
# - as_slugid:      convert a label into a slugId
# - from_now:       generate a timestamp at a fixed offset from now
# - shellquote:     quote the contents for injection into shell

# The resulting tasks' taskGroupId will be equal to the taskId of the first
# task listed here, which should be the decision task.  This gives other tools
# an easy way to determine the ID of the decision task that created a
# particular group.

tasks:
  - taskId: '{{#as_slugid}}decision task{{/as_slugid}}'
    task:
      created: '{{now}}'
      deadline: '{{#from_now}}1 day{{/from_now}}'
      expires: '{{#from_now}}365 day{{/from_now}}'
      metadata:
        owner: mozilla-taskcluster-maintenance@mozilla.com
        source: {{{source}}}
        name: "Gecko Decision Task"
        description: |
            The task that creates all of the other tasks in the task graph

      workerType: "gecko-decision"
      provisionerId: "aws-provisioner-v1"

      tags:
        createdForUser: {{owner}}

      routes:
        - "index.gecko.v2.{{project}}.latest.firefox.decision"
        - "tc-treeherder.v2.{{project}}.{{revision}}.{{pushlog_id}}"
        - "tc-treeherder-stage.v2.{{project}}.{{revision}}.{{pushlog_id}}"
        - "notify.email.{{owner}}.on-failed"
        - "notify.email.{{owner}}.on-exception"

      payload:
        env:
          # checkout-gecko uses these to check out the source; the inputs
          # to `mach taskgraph decision` are all on the command line.
          GECKO_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-unified'
          GECKO_HEAD_REPOSITORY: '{{{url}}}'
          GECKO_HEAD_REF: '{{revision}}'
          GECKO_HEAD_REV: '{{revision}}'
          HG_STORE_PATH: /home/worker/checkouts/hg-store

        cache:
          level-{{level}}-checkouts: /home/worker/checkouts

        features:
          taskclusterProxy: true
          chainOfTrust: true

        # Note: This task is built server side without the context or tooling that
        # exist in tree so we must hard code the hash
        # XXX Changing this will break Chain of Trust without an associated puppet and
        # scriptworker patch!
        image: 'taskcluster/decision:0.1.8@sha256:195d8439c8e90d59311d877bd2a8964849b2e43bfc6c234092618518d8b2891b'

        maxRunTime: 1800

        # TODO use mozilla-unified for the base repository once the tc-vcs
        # tar.gz archives are created or tc-vcs isn't being used.
        command:
          - /home/worker/bin/run-task
          - '--vcs-checkout=/home/worker/checkouts/gecko'
          - '--'
          - bash
          - -cx
          - >
              cd /home/worker/checkouts/gecko &&
              ln -s /home/worker/artifacts artifacts &&
              ./mach --log-no-times taskgraph decision
              --pushlog-id='{{pushlog_id}}'
              --pushdate='{{pushdate}}'
              --project='{{project}}'
              --message={{#shellquote}}{{{comment}}}{{/shellquote}}
              --owner='{{owner}}'
              --level='{{level}}'
              --base-repository='https://hg.mozilla.org/mozilla-central'
              --head-repository='{{{url}}}'
              --head-ref='{{revision}}'
              --head-rev='{{revision}}'

        artifacts:
          'public':
            type: 'directory'
            path: '/home/worker/artifacts'
            expires: '{{#from_now}}364 days{{/from_now}}'

      extra:
        treeherder:
          symbol: D