Skip to content

Commit 34f0654

Browse files
BUILD-7780: Use monthly cache for orchestrator
Signed-off-by: Jayadeep Kinavoor Madam <[email protected]>
1 parent 80ca7c8 commit 34f0654

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.cirrus.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,26 @@ 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+
TASK_NAME_WITH_VERSION="${CIRRUS_TASK_NAME}-${SQ_VERSION}"
71+
else
72+
TASK_NAME_WITH_VERSION="${CIRRUS_TASK_NAME}"
73+
fi
74+
75+
echo "CURRENT_MONTH=$(date +"%B")" >> $CIRRUS_ENV
76+
echo "ORCHESTRATOR_HOME=${CIRRUS_WORKING_DIR}/orchestrator/${TASK_NAME_WITH_VERSION}/${CURRENT_MONTH}" >> $CIRRUS_ENV
77+
echo "TASK_NAME_WITH_VERSION=${TASK_NAME_WITH_VERSION}" >> $CIRRUS_ENV
78+
mkdir_orchestrator_home_script: |
79+
echo "Create dir ${ORCHESTRATOR_HOME} if needed"
80+
mkdir -p ${ORCHESTRATOR_HOME}
81+
orchestrator_cache:
82+
folder: ${ORCHESTRATOR_HOME}
83+
fingerprint_script: echo ${TASK_NAME_WITH_VERSION}-${CURRENT_MONTH}
84+
reupload_on_changes: "true"
85+
6686
setup_gradle_cache_template: &SETUP_GRADLE_CACHE
6787
gradle_cache:
6888
folder: .gradle/caches
@@ -78,6 +98,7 @@ cleanup_gradle_cache_script_template: &CLEANUP_GRADLE_CACHE_SCRIPT
7898

7999
gradle_its_template: &GRADLE_ITS_TEMPLATE
80100
<<: *SETUP_GRADLE_CACHE
101+
<<: *ORCHESTRATOR_CACHE_DEFINITION
81102
run_its_script:
82103
- |
83104
if [ -n "${GIT_SUB_MODULE}" ]; then
@@ -198,6 +219,7 @@ qa_ruling_kotlin_compiler_task:
198219
GIT_SUB_MODULE: "its/sources"
199220
<<: *LINUX_6_CPU_12G_JAVA_17
200221
<<: *SETUP_GRADLE_CACHE
222+
<<: *ORCHESTRATOR_CACHE_DEFINITION
201223
run_its_script:
202224
- |
203225
if [ -n "${GIT_SUB_MODULE}" ]; then

0 commit comments

Comments
 (0)