From cf937924d5f5ab9c343b7e5c553bd329f2315c4f Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Thu, 5 Mar 2026 17:07:58 +0100 Subject: [PATCH 1/5] chore(ci) : add final_status property on junit XML [APMSP-2610] --- .gitlab/add_final_status.xsl | 50 ++++++++++++++++++++++++++++++++++++ .gitlab/upload_ciapp.sh | 17 ++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 .gitlab/add_final_status.xsl diff --git a/.gitlab/add_final_status.xsl b/.gitlab/add_final_status.xsl new file mode 100644 index 00000000000..ea2958a85ae --- /dev/null +++ b/.gitlab/add_final_status.xsl @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + fail + skip + pass + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitlab/upload_ciapp.sh b/.gitlab/upload_ciapp.sh index 604adef1ad4..a7cb9f41422 100755 --- a/.gitlab/upload_ciapp.sh +++ b/.gitlab/upload_ciapp.sh @@ -75,6 +75,23 @@ coverage_upload() { datadog-ci coverage upload --ignored-paths=./test-published-dependencies . } +# Add dd_tags[test.final_status] property to each testcase before upload +add_final_status_tags() { + local xsl_file + xsl_file="$(dirname "$0")/add_final_status.xsl" + find ./results -name '*.xml' | while read -r xml_file; do + local tmp_file + tmp_file="$(mktemp)" + if xsltproc --output "$tmp_file" "$xsl_file" "$xml_file" 2>/dev/null; then + mv "$tmp_file" "$xml_file" + else + rm -f "$tmp_file" + fi + done +} + +add_final_status_tags + # Upload test results to production environment like all other CI jobs junit_upload "$DATADOG_API_KEY_PROD" junit_upload_status=$? From 9f641ef134f97fe2bd0a344db4a57825a932b9b7 Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Thu, 5 Mar 2026 18:20:58 +0100 Subject: [PATCH 2/5] Add echo in script --- .gitlab/upload_ciapp.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab/upload_ciapp.sh b/.gitlab/upload_ciapp.sh index a7cb9f41422..38c4af0caeb 100755 --- a/.gitlab/upload_ciapp.sh +++ b/.gitlab/upload_ciapp.sh @@ -75,13 +75,14 @@ coverage_upload() { datadog-ci coverage upload --ignored-paths=./test-published-dependencies . } -# Add dd_tags[test.final_status] property to each testcase before upload add_final_status_tags() { + echo "Add dd_tags[test.final_status] property to each testcase before upload" local xsl_file xsl_file="$(dirname "$0")/add_final_status.xsl" find ./results -name '*.xml' | while read -r xml_file; do local tmp_file tmp_file="$(mktemp)" + echo "Fixing $xml_file" if xsltproc --output "$tmp_file" "$xsl_file" "$xml_file" 2>/dev/null; then mv "$tmp_file" "$xml_file" else From 7a90a564cf71bc68782113b8e4ee146a7133c1de Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Thu, 5 Mar 2026 18:45:12 +0100 Subject: [PATCH 3/5] debug --- .gitlab/upload_ciapp.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab/upload_ciapp.sh b/.gitlab/upload_ciapp.sh index 38c4af0caeb..bf4a87606b4 100755 --- a/.gitlab/upload_ciapp.sh +++ b/.gitlab/upload_ciapp.sh @@ -82,10 +82,15 @@ add_final_status_tags() { find ./results -name '*.xml' | while read -r xml_file; do local tmp_file tmp_file="$(mktemp)" - echo "Fixing $xml_file" if xsltproc --output "$tmp_file" "$xsl_file" "$xml_file" 2>/dev/null; then + echo "before $xml_file" + cat $xml_file + echo "after $tmp_file" + cat $tmp_file mv "$tmp_file" "$xml_file" else + echo Fail $xml_file + xsltproc --output "$tmp_file" "$xsl_file" "$xml_file" rm -f "$tmp_file" fi done From e7b4064f394278a8348acd29bd4e1c1c8150c21f Mon Sep 17 00:00:00 2001 From: Sarah Chen Date: Fri, 6 Mar 2026 09:46:44 -0500 Subject: [PATCH 4/5] Update build image --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7de33f10177..2c6b128b0a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ variables: GRADLE_VERSION: "8.14.4" # must match gradle-wrapper.properties MAVEN_REPOSITORY_PROXY: "https://depot-read-api-java.us1.ddbuild.io/magicmirror/magicmirror/@current/" GRADLE_PLUGIN_PROXY: "https://depot-read-api-java.us1.ddbuild.io/magicmirror/magicmirror/@current/" - BUILDER_IMAGE_VERSION_PREFIX: "v26.02-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "v25.05-") + BUILDER_IMAGE_VERSION_PREFIX: "v26.03-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "v25.05-") REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations" DEFAULT_TEST_JVMS: /^(8|11|17|21|25|tip)$/ # the latest "tip" version is 26 PROFILE_TESTS: From c4e35f78c5cfd93d973a5f27f77b518d85b81520 Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Fri, 6 Mar 2026 18:49:11 +0100 Subject: [PATCH 5/5] Simplify and remove debug instruction --- .gitlab/upload_ciapp.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.gitlab/upload_ciapp.sh b/.gitlab/upload_ciapp.sh index bf4a87606b4..7d23067c387 100755 --- a/.gitlab/upload_ciapp.sh +++ b/.gitlab/upload_ciapp.sh @@ -82,17 +82,8 @@ add_final_status_tags() { find ./results -name '*.xml' | while read -r xml_file; do local tmp_file tmp_file="$(mktemp)" - if xsltproc --output "$tmp_file" "$xsl_file" "$xml_file" 2>/dev/null; then - echo "before $xml_file" - cat $xml_file - echo "after $tmp_file" - cat $tmp_file - mv "$tmp_file" "$xml_file" - else - echo Fail $xml_file - xsltproc --output "$tmp_file" "$xsl_file" "$xml_file" - rm -f "$tmp_file" - fi + xsltproc --output "$tmp_file" "$xsl_file" "$xml_file" + mv "$tmp_file" "$xml_file" done }