@@ -665,17 +665,20 @@ broadcast_tests:
665
665
test_tools_tests :
666
666
stage : test
667
667
extends : .test_tools_based
668
-
668
+ needs :
669
+ - !reference [.test_tools_based, needs]
670
+ - job : copy_testing_block_logs_to_cache
669
671
variables :
670
672
PYTEST_TIMEOUT_MINUTES : 30
671
673
PYTEST_JUNIT_REPORT : $CI_PROJECT_DIR/tests/python/hive-local-tools/test-tools/tests/report.xml
672
-
674
+ TESTING_BLOCK_LOGS_DESTINATION : $CI_PROJECT_DIR/tests/python/hive-local-tools/test-tools/tests/testing_block_logs
673
675
script :
674
- - cd tests/python/hive-local-tools/test-tools/tests
676
+ - cp -r $TESTING_BLOCK_LOGS_CACHE_DIR/* $TESTING_BLOCK_LOGS_DESTINATION
677
+ - cd $CI_PROJECT_DIR/tests/python/hive-local-tools/test-tools/tests
675
678
- pip install local-tools/
676
679
- !reference [.run-pytest, script]
677
680
tags :
678
- - public-runner-docker
681
+ - data-cache-storage
679
682
680
683
rc_direct_delegations_tests :
681
684
stage : test
@@ -1184,6 +1187,61 @@ authority_tests:
1184
1187
tags :
1185
1188
- public-runner-docker
1186
1189
1190
+ generate_testing_block_logs_and_save_image :
1191
+ stage : build
1192
+ extends : [.extended_block_log_creation, .test_tools_based]
1193
+ timeout : 1h
1194
+ variables :
1195
+ GIT_DEPTH : 0
1196
+ TESTING_BLOCK_LOGS_DIR : " $CI_PROJECT_DIR/testing_block_logs"
1197
+ script :
1198
+ - $CI_PROJECT_DIR/scripts/ci-helpers/testing_block_log_image_generator.sh
1199
+ artifacts :
1200
+ reports :
1201
+ dotenv :
1202
+ - testing_block_log_latest_version.env
1203
+ - testing_block_log_latest_commit_short_sha.env
1204
+ tags :
1205
+ - public-runner-docker
1206
+ - hived-for-tests
1207
+
1208
+ copy_testing_block_logs_to_cache :
1209
+ stage : build
1210
+ extends : .docker_image_builder_job
1211
+ needs :
1212
+ - job : generate_testing_block_logs_and_save_image
1213
+ artifacts : true
1214
+ variables :
1215
+ TESTING_BLOCK_LOGS_CACHE_DIR : " /cache/testing_block_logs_${TESTING_BLOCK_LOG_LATEST_COMMIT_SHORT_SHA}"
1216
+ script :
1217
+ - echo $TESTING_BLOCK_LOGS_CACHE_DIR
1218
+ - echo "TESTING_BLOCK_LOGS_CACHE_DIR=$TESTING_BLOCK_LOGS_CACHE_DIR" > $CI_PROJECT_DIR/testing_block_log_cache_dir.env
1219
+ - |
1220
+ if [ -d "$TESTING_BLOCK_LOGS_CACHE_DIR" ]; then
1221
+ echo "Directory $TESTING_BLOCK_LOGS_CACHE_DIR exists. Skipping copy from image process..."
1222
+ else
1223
+ echo "Start copy testing block logs from image - $TESTING_BLOCK_LOG_LATEST_VERSION_IMAGE"
1224
+ mkdir -p $TESTING_BLOCK_LOGS_CACHE_DIR && cd $TESTING_BLOCK_LOGS_CACHE_DIR
1225
+ echo "Start copy block_logs from - $TESTING_BLOCK_LOG_LATEST_VERSION_IMAGE"
1226
+ docker pull $TESTING_BLOCK_LOG_LATEST_VERSION_IMAGE
1227
+ $CI_PROJECT_DIR/scripts/ci-helpers/export-data-from-docker-image.sh $TESTING_BLOCK_LOG_LATEST_VERSION_IMAGE $TESTING_BLOCK_LOGS_CACHE_DIR --image-path=/
1228
+ checksum_from_image=$(docker inspect --format='{{ index .Config.Labels "testing_block_logs_checksum" }}' $TESTING_BLOCK_LOG_LATEST_VERSION_IMAGE)
1229
+ echo "Checksum from image: $checksum_from_image"
1230
+ checksum_after_copy=$(find $TESTING_BLOCK_LOGS_CACHE_DIR -type f | sort | xargs cat | md5sum |cut -d ' ' -f 1)
1231
+ echo "Checksum after copy: $checksum_after_copy"
1232
+ if [[ "$checksum_from_image" != "$checksum_after_copy" ]]; then
1233
+ echo "Checksum mismatch detected! The checksum from the container does not match the checksum after copying."
1234
+ exit 1
1235
+ fi
1236
+ fi
1237
+ - tree $TESTING_BLOCK_LOGS_CACHE_DIR
1238
+ artifacts :
1239
+ reports :
1240
+ dotenv :
1241
+ - testing_block_log_cache_dir.env
1242
+ tags :
1243
+ - data-cache-storage
1244
+
1187
1245
generate_universal_block_logs_and_save_image :
1188
1246
stage : build
1189
1247
extends : [.extended_block_log_creation, .test_tools_based]
0 commit comments