Merge branch 'bugfix/VNC-222-on-fail-report-not-shown-in-ci' into 'master'

VNC-222 Presets test failing without showing report in CI

Closes VNC-222

See merge request kasm-technologies/internal/KasmVNC!196
This commit is contained in:
Matthew McClaskey 2025-07-24 07:50:42 +00:00
commit 1179e94e2c
2 changed files with 11 additions and 5 deletions

View file

@ -89,9 +89,14 @@ upload_report_to_s3() {
}
put_report_into_ci_pipeline() {
report_name="Functional%20test%20report"
report_url="https://${S3_BUCKET}.s3.amazonaws.com/${s3_tests_directory}/report/index.html"
curl --request POST --header "PRIVATE-TOKEN:${GITLAB_API_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/statuses/${CI_COMMIT_SHA}?state=success&name=${report_name}&target_url=${report_url}"
local functional_tests_exit_code="$1"
local report_name="Functional%20test%20report"
local report_url="https://${S3_BUCKET}.s3.amazonaws.com/${s3_tests_directory}/report/index.html"
local state="success"
if [ "$functional_tests_exit_code" -ne 0 ]; then
state="failed"
fi
curl --request POST --header "PRIVATE-TOKEN:${GITLAB_API_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/statuses/${CI_COMMIT_SHA}?state=${state}&name=${report_name}&target_url=${report_url}"
}
prepare_kasmvnc_built_packages_to_replace_workspaces_image_packages() {

View file

@ -59,9 +59,10 @@ functional_test:
- . .ci/helpers.sh
script:
- prepare_to_run_functional_tests
- ./functional-test
- set +e; ./functional-test; exit_code=$?; set -e
- upload_report_to_s3
- put_report_into_ci_pipeline
- put_report_into_ci_pipeline "$exit_code"
- exit "$exit_code"
dependencies:
- build_amd64
artifacts: