diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2021-11-19 12:55:03 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-11-26 20:03:18 +0000 |
commit | c8ae9d570be497e6ca1ca06b69018a25c12f3b8c (patch) | |
tree | bf567836e16fa0d5062c7374be6fb23e9b1c38e7 /server/sonar-web/build.gradle | |
parent | b03252287d5fec029ba0fbda097015b4df8a459e (diff) | |
download | sonarqube-c8ae9d570be497e6ca1ca06b69018a25c12f3b8c.tar.gz sonarqube-c8ae9d570be497e6ca1ca06b69018a25c12f3b8c.zip |
SONAR-15677 Update build pipeline
Diffstat (limited to 'server/sonar-web/build.gradle')
-rw-r--r-- | server/sonar-web/build.gradle | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle index 12316e69bcc..c6c59e1cbec 100644 --- a/server/sonar-web/build.gradle +++ b/server/sonar-web/build.gradle @@ -5,7 +5,7 @@ sonarqube { property "sonar.tests", "src/main/js" property "sonar.test.inclusions", "src/main/js/**/__tests__/**" property "sonar.exclusions", "src/main/js/**/__tests__/**" - property "sonar.eslint.reportPaths", "eslint-report.json" + property "sonar.eslint.reportPaths", "eslint-report/eslint-report.json" property "sonar.javascript.lcov.reportPaths", "coverage/lcov.info" } } @@ -26,6 +26,20 @@ task yarn_run(type: Exec) { } build.dependsOn(yarn_run) +task "yarn_lint-report-ci"(type: Exec) { + // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized + ['config', 'src/main/js'].each { + inputs.dir(it) + } + ['package.json', 'yarn.lock', 'tsconfig.json', '.eslintrc'].each { + inputs.file(it) + } + outputs.dir('eslint-report') + outputs.cacheIf { true } + + commandLine osAdaptiveCommand(['npm', 'run', 'lint-report-ci']) +} + task "yarn_validate-ci"(type: Exec) { // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized ['config', 'src/main/js'].each { @@ -34,7 +48,6 @@ task "yarn_validate-ci"(type: Exec) { ['package.json', 'yarn.lock', 'tsconfig.json', '.eslintrc'].each { inputs.file(it) } - outputs.file('eslint-report.json') outputs.dir('coverage') outputs.cacheIf { true } |