[Security Solution][Endpoint] Change where agent diagnostic files saved on test failures for cypress suites (#220272)

## Summary

- Changes the location of any captured Elastic agent diagnostics files
during a cypress tests failure to `target/agent_diagnostics` from
`target/test_failures`
This commit is contained in:
Paul Tavares 2025-05-07 10:32:32 -04:00 committed by GitHub
parent 208d7b5d38
commit ae5a93811b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -54,6 +54,10 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
ts-node .buildkite/scripts/lifecycle/annotate_test_failures.ts
fi
if [[ -d 'target/agent_diagnostics' ]]; then
buildkite-agent artifact upload 'target/agent_diagnostics/**/*'
fi
fi
if [[ $BUILDKITE_COMMAND_EXIT_STATUS -ne 0 ]]; then

View file

@ -577,7 +577,7 @@ ${s1Info.status}
.toISOString()
.replace(/:/g, '.')}.zip`;
const vmDiagnosticsFile = `/tmp/${fileName}`;
const localDiagnosticsDir = `${REPO_ROOT}/target/test_failures`;
const localDiagnosticsDir = `${REPO_ROOT}/target/agent_diagnostics`;
const localDiagnosticsFile = `${localDiagnosticsDir}/${
fileNamePrefix
? // Insure the file name prefix does not have characters that can't be used in file names