From 874545079d90aa5ed20aa84ceda7833344bf70c8 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 8 Apr 2026 16:56:03 -0300 Subject: [PATCH] Warn when KVM job didn't run --- .gitlab-ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4120d63a..169066a3d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -334,7 +334,17 @@ libs database schema: - kvm # Cache hits the storage limits in kvm runners quickly cache: [] + artifacts: + reports: + codequality: codequality-warnings.json script: + - | + if [ -z "$RUN_KVM_JOBS" ]; then + echo "WARNING: RUN_KVM_JOBS environment variable is not set." + echo "This job requires a special KVM runner. Skipping with warning." + echo '[{"location":{"path":".gitlab-ci.yml","lines":{"begin":237}},"description":"KVM job was skipped: RUN_KVM_JOBS env variable is not set. Set it to 1 to enable this job.","check_name":"skipped_kvm_job","fingerprint":"skipped_kvm_job","severity":"minor"}]' > codequality-warnings.json + exit 42 + fi - ./gradlew assembleFullDebug - export AVD_SDK=`echo $CI_JOB_NAME | awk '{print $2}'` - export AVD_TAG=`echo $CI_JOB_NAME | awk '{print $3}'` @@ -354,7 +364,9 @@ libs database schema: - export FLAG="-Pandroid.testInstrumentationRunnerArguments.annotation=androidx.test.filters.FlakyTest" - for i in {1..5}; do echo "$i" && ./gradlew $FLAG :app:connectedBasicDebugAndroidTest :legacy:connectedFullDebugAndroidTest :libs:database:connectedCheck :libs:download:connectedAndroidTest :libs:index:connectedAndroidTest && break; done || exit 137 allow_failure: - exit_codes: 137 + exit_codes: + - 42 + - 137 kvm 24 default x86: <<: [ *test-template, *kvm-connected-template ]