Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[devops] Make agent log gathering more resilient. (#21035)
Sometimes gathering logs fail: ========================== Starting Command Output =========================== /usr/local/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '/Users/builder/azdo/_work/_temp/d21eee53-34e9-41e1-bfb3-335bf6a0c07f.ps1' Build pipeline start time: generate_agent_logs.ps1: /Users/builder/azdo/_work/_temp/d21eee53-34e9-41e1-bfb3-335bf6a0c07f.ps1:3 Line | 3 | /Users/builder/azdo/_work/2/s/xamarin-macios/tools/devops/automation/ … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Exception calling "Parse" with "1" argument(s): "String '' was not | recognized as a valid DateTime." ##[error]PowerShell exited with code '1'. Finishing: Gathering agent logs Which isn't a big problem, except that the later "Publish Artifacts: Agent logs" step fails even though "continueOnError: true" if the file doesn't exist. So hack this by swallowing any errors in the log gathering phase, but ensuring that the expected output file exists at the end even if something went wrong.
- Loading branch information
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.