aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalena Ebert <63863184+malena-ebert-sonarsource@users.noreply.github.com>2021-01-18 11:52:49 +0100
committersonartech <sonartech@sonarsource.com>2021-01-21 20:30:30 +0000
commit23b1a931472ff74c3c48be78c203472e7aa15e6a (patch)
treedb805cbf0f61f98b7e8f6ad84e85432810e97073
parentaed88b2594e3965a3f6f4a07fef42ab4f58d6dcc (diff)
downloadsonarqube-23b1a931472ff74c3c48be78c203472e7aa15e6a.tar.gz
sonarqube-23b1a931472ff74c3c48be78c203472e7aa15e6a.zip
Split yarn validate-ci task
-rw-r--r--.cirrus.yml13
-rw-r--r--server/sonar-docs/build.gradle12
-rw-r--r--server/sonar-docs/package.json3
-rw-r--r--server/sonar-web/build.gradle12
-rw-r--r--server/sonar-web/package.json3
5 files changed, 41 insertions, 2 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 9bf19620c68..6d56edf221c 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -128,6 +128,19 @@ validate_license_change_task:
$CIRRUS_CHANGE_MESSAGE =~ '.*\[update headers\].*'
timeout_in: 180m # Increase timeout, as license changes impact all files, which slows down the analysis considerably.
+yarn_check-ci_task:
+ <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
+ timeout_in: 90m
+ gke_container:
+ <<: *GKE_CONTAINER_TEMPLATE
+ cpu: 4
+ memory: 8Gb
+ script: |
+ ./private/cirrus/cirrus-env.sh YARN
+ gradle yarn_check-ci
+ on_failure:
+ <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
+
qa_task:
<<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
gke_container:
diff --git a/server/sonar-docs/build.gradle b/server/sonar-docs/build.gradle
index 7a078b46c4c..39051304b87 100644
--- a/server/sonar-docs/build.gradle
+++ b/server/sonar-docs/build.gradle
@@ -70,6 +70,18 @@ yarn_run {
// To clean outputs outside of "build" directory:
clean.dependsOn(cleanYarn_run)
+"yarn_check-ci" {
+ // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
+ ['config', 'src'].each {
+ inputs.dir(it)
+ }
+ ['package.json', 'yarn.lock', 'tsconfig.json'].each {
+ inputs.file(it)
+ }
+
+ dependsOn(yarn)
+}
+
"yarn_validate-ci" {
// Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
['config', 'src'].each {
diff --git a/server/sonar-docs/package.json b/server/sonar-docs/package.json
index 6482390b418..6eaecc42472 100644
--- a/server/sonar-docs/package.json
+++ b/server/sonar-docs/package.json
@@ -74,7 +74,8 @@
"lint-report": "eslint --ext js,ts,tsx -f json -o eslint-report.json src",
"ts-check": "tsc --noEmit",
"validate": "yarn lint && yarn ts-check && yarn format-check && yarn test",
- "validate-ci": "yarn lint-report && yarn ts-check && yarn format-check && yarn test --coverage"
+ "validate-ci": "yarn lint-report && yarn test --coverage",
+ "check-ci": "yarn ts-check && yarn format-check"
},
"prettier": {
"jsxBracketSameLine": true,
diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle
index a7d2411047f..429a2c1c262 100644
--- a/server/sonar-web/build.gradle
+++ b/server/sonar-web/build.gradle
@@ -27,6 +27,18 @@ yarn_run {
}
build.dependsOn(yarn_run)
+"yarn_check-ci" {
+ // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
+ ['config', 'src'].each {
+ inputs.dir(it)
+ }
+ ['package.json', 'yarn.lock', 'tsconfig.json'].each {
+ inputs.file(it)
+ }
+
+ dependsOn(yarn)
+}
+
"yarn_validate-ci" {
// Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
['config', 'src/main/js'].each {
diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json
index 941f8fe2b63..b37be90d3e7 100644
--- a/server/sonar-web/package.json
+++ b/server/sonar-web/package.json
@@ -132,7 +132,8 @@
"lint-report": "eslint --ext js,ts,tsx -f json -o eslint-report.json src/main/js",
"ts-check": "tsc --noEmit",
"validate": "yarn lint && yarn ts-check && yarn format-check && yarn test",
- "validate-ci": "yarn lint-report && yarn ts-check && yarn format-check && yarn test --coverage",
+ "validate-ci": "yarn lint-report && yarn test --coverage",
+ "check-ci": "yarn ts-check && yarn format-check",
"precommit": "yarn ts-check && lint-staged"
},
"engines": {