testing/taskcluster/tasks/tests/eslint-gecko.yml
author Michael Ratcliffe <mratcliffe@mozilla.com>
Mon, 02 May 2016 00:22:31 +0100
changeset 297757 b4564c057f93c736521672ffa54b23d9b4c92b94
parent 290008 93c1fd8563307ecf2543e381e2f79fea0659b796
child 299653 42fab251fe111d5f891c9bde0ee1fb6f7f946a50
permissions -rw-r--r--
Bug 1265082 - ESLint jobs are apparently hitting the network r=me,dustin,pbro,jryans So a few changes here: - node_modules is downloaded using tooltool so that we dont need to rely on external infrastructure. - We have a npm-shrinkwrap.json file that version locks all of our node packages. - eslint, eslint-plugin-mozilla etc. are now all installed locally. In reality this means that we don't hit the network and we don't force users into installing global packages. ./mach eslint --setup has also been improved. We install packages locally and display the path of the user's eslint binary (useful for configuring editors). eslint-plugin-mozilla has been moved from testing/eslint-plugin-mozilla to /testing/eslint/eslint-plugin-mozilla. The node_modules directory for eslint and other plugins is located in testing/eslint/. MozReview-Commit-ID: 4SFSxzka6BS

---
$inherits:
    from: 'tasks/lint.yml'
    variables:
      build_product: 'lint'
      build_name: 'eslint-gecko'
      build_type: 'opt'

task:
  metadata:
    name: '[TC] - ESLint'
    description: 'ESLint test'

  payload:
    image:
      type: 'task-image'
      path: 'public/image.tar'
      taskId: '{{#task_id_for_image}}lint{{/task_id_for_image}}'

    command:
      - bash
      - -cx
      - >
          tc-vcs checkout ./gecko {{base_repository}} {{head_repository}} {{head_rev}} {{head_ref}} &&
          cd gecko/testing/eslint &&
          /build/tooltool.py fetch -m manifest.tt &&
          tar xvfz eslint.tar.gz &&
          rm eslint.tar.gz &&
          cd ../.. &&
          testing/eslint/node_modules/.bin/eslint --plugin html --ext [.js,.jsm,.jsx,.xml,.html] -f tools/lint/eslint-formatter .

  extra:
    locations:
        build: null
        tests: null
    treeherder:
        machine:
            platform: lint
        groupSymbol: tc
        symbol: ES
    treeherderEnv:
        - production
        - staging