Warn when KVM job didn't run

This commit is contained in:
Torsten Grote
2026-04-08 16:56:03 -03:00
parent 4c5ccfc4c5
commit 874545079d

View File

@@ -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 ]