@@ -63,6 +63,30 @@ windows_16_cpu_32G_template: &WINDOWS_16_CPU_32G
6363 preemptible : false
6464 use_ssd : true
6565
66+ orchestrator_cache_definition : &ORCHESTRATOR_CACHE_DEFINITION
67+ set_orchestrator_home_script : |
68+ # Check if SQ_VERSION exists and create an intermediary variable
69+ if [ -n "$SQ_VERSION" ]; then
70+ FOLDER="${SQ_VERSION}"
71+ else
72+ FOLDER="DEFAULT"
73+ fi
74+
75+ CURRENT_MONTH=$(date +"%B")
76+ echo "CURRENT_MONTH=${CURRENT_MONTH}" >> $CIRRUS_ENV
77+ echo "ORCHESTRATOR_HOME=${CIRRUS_WORKING_DIR}/orchestrator/${FOLDER}/${CURRENT_MONTH}" >> $CIRRUS_ENV
78+ echo "FOLDER=${FOLDER}" >> $CIRRUS_ENV
79+ mkdir_orchestrator_home_script : |
80+ echo "Create dir ${ORCHESTRATOR_HOME} if needed"
81+ mkdir -p ${ORCHESTRATOR_HOME}
82+ orchestrator_cache :
83+ folder : ${ORCHESTRATOR_HOME}
84+ fingerprint_script : echo ${FOLDER}-${CURRENT_MONTH}
85+ reupload_on_changes : " true"
86+
87+ cleanup_orchestrator_cache_script_template : &CLEANUP_ORCHESTRATOR_CACHE_SCRIPT
88+ cleanup_orchestrator_cache_script : .cirrus/clean-orchestrator-cache.sh
89+
6690setup_gradle_cache_template : &SETUP_GRADLE_CACHE
6791 gradle_cache :
6892 folder : .gradle/caches
@@ -78,6 +102,7 @@ cleanup_gradle_cache_script_template: &CLEANUP_GRADLE_CACHE_SCRIPT
78102
79103gradle_its_template : &GRADLE_ITS_TEMPLATE
80104 << : *SETUP_GRADLE_CACHE
105+ << : *ORCHESTRATOR_CACHE_DEFINITION
81106 run_its_script :
82107 - |
83108 if [ -n "${GIT_SUB_MODULE}" ]; then
@@ -89,6 +114,7 @@ gradle_its_template: &GRADLE_ITS_TEMPLATE
89114 " -DbuildNumber=$BUILD_NUMBER"
90115 --info --console plain --no-daemon --build-cache
91116 << : *CLEANUP_GRADLE_CACHE_SCRIPT
117+ << : *CLEANUP_ORCHESTRATOR_CACHE_SCRIPT
92118
93119only_if_sonarsource_qa_template : &ONLY_IF_SONARSOURCE_QA
94120 only_if : $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == "master" || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BRANCH =~ "dogfood-on-.*")
@@ -198,6 +224,7 @@ qa_ruling_kotlin_compiler_task:
198224 GIT_SUB_MODULE : " its/sources"
199225 << : *LINUX_6_CPU_12G_JAVA_17
200226 << : *SETUP_GRADLE_CACHE
227+ << : *ORCHESTRATOR_CACHE_DEFINITION
201228 run_its_script :
202229 - |
203230 if [ -n "${GIT_SUB_MODULE}" ]; then
@@ -209,6 +236,7 @@ qa_ruling_kotlin_compiler_task:
209236 " -DbuildNumber=$BUILD_NUMBER"
210237 --info --console plain --no-daemon --build-cache
211238 << : *CLEANUP_GRADLE_CACHE_SCRIPT
239+ << : *CLEANUP_ORCHESTRATOR_CACHE_SCRIPT
212240
213241build_win_task :
214242 << : *QA_TASK_FILTER
0 commit comments