diff options
author | Robert Speicher <robert@gitlab.com> | 2016-11-23 10:09:05 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-11-23 10:09:05 +0300 |
commit | 0676c5c7140ccf5b809eddab79b6fb78b7db0a66 (patch) | |
tree | f80459eabf22eff192e790866f53f567ba082830 /.gitlab-ci.yml | |
parent | d0c0c75ca9568bc3ec00c341a6053623d85e6201 (diff) | |
parent | 459cd939e7a31c833858c86db6003327524800de (diff) |
Merge branch 'eslint-html-report' into 'master'
Generate ESLint HTML report
## What does this MR do?
Generate a HTML report for the linting errors that ESLint discovered
(including files that contain `/* eslint-disable */`).
See merge request !7374
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab45ea57aed..2b65bc4182b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -349,7 +349,7 @@ coverage: - coverage/index.html - coverage/assets/ -lint-javascript: +lint:javascript: cache: paths: - node_modules/ @@ -358,7 +358,24 @@ lint-javascript: before_script: - npm install script: - - npm run eslint + - npm --silent run eslint + +lint:javascript:report: + cache: + paths: + - node_modules/ + stage: post-test + image: "node:7.1" + before_script: + - npm install + script: + - find app/ spec/ -name '*.js' -or -name '*.js.es6' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files + - npm --silent run eslint-report || true # ignore exit code + artifacts: + name: eslint-report + expire_in: 31d + paths: + - eslint-report.html # Trigger docs build # https://gitlab.com/gitlab-com/doc-gitlab-com/blob/master/README.md#deployment-process @@ -398,11 +415,13 @@ pages: dependencies: - coverage - teaspoon + - lint:javascript:report script: - mv public/ .public/ - mkdir public/ - mv coverage public/coverage-ruby - mv coverage-javascript/default/ public/coverage-javascript/ + - mv eslint-report.html public/ artifacts: paths: - public |