summaryrefslogtreecommitdiffstats
path: root/.cirrus.yml
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2021-03-29 17:31:59 +0200
committersonartech <sonartech@sonarsource.com>2021-04-01 20:03:45 +0000
commitb02d849f437e4ac4a32bbe0d6f4aea74a80f9af7 (patch)
treeb7afca0ccf51f3a8cabd190a0b6a72c2a75041bf /.cirrus.yml
parentb26fc33ebb5525e812b5bebd23a0e4ab253f2180 (diff)
downloadsonarqube-b02d849f437e4ac4a32bbe0d6f4aea74a80f9af7.tar.gz
sonarqube-b02d849f437e4ac4a32bbe0d6f4aea74a80f9af7.zip
BUILD-894 Cache node_modules for faster execution times
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index dd3adb9c844..3039703f75c 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -85,7 +85,19 @@ screenshots_on_failure_template: &REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
screenshots_artifacts:
path: "**/build/screenshots/**/*"
+node_modules_cache_template: &NODE_MODULES_CACHE_TEMPLATE
+ node_modules_cache:
+ folder: "**/node_modules"
+ fingerprint_script: |
+ cat \
+ server/sonar-web/yarn.lock \
+ server/sonar-docs/yarn.lock \
+ private/core-extension-governance/yarn.lock \
+ private/core-extension-license/yarn.lock \
+ private/core-extension-securityreport/yarn.lock
+
build_task:
+ <<: *NODE_MODULES_CACHE_TEMPLATE
only_if: >-
$CIRRUS_BRANCH !=~ "dogfood/.*" &&
$CIRRUS_BRANCH != "public_master" &&
@@ -108,6 +120,7 @@ build_task:
validate_task: &VALIDATE_TASK
<<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
+ <<: *NODE_MODULES_CACHE_TEMPLATE
timeout_in: 90m
gke_container:
<<: *GKE_CONTAINER_TEMPLATE
@@ -133,6 +146,7 @@ validate_license_change_task:
yarn_check-ci_task:
<<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
+ <<: *NODE_MODULES_CACHE_TEMPLATE
timeout_in: 90m
gke_container:
<<: *GKE_CONTAINER_TEMPLATE