-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Set TEMP environment variable to $TempDir on CI machines #41361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dotnet/arcade#4744 reverted setting the variable in `tools.ps1` due to issues it caused in other repos.
|
@JoeRobich PTAL |
No reasonable CI persists this state between independent executions (doing so allows a build to corrupt an unrelated future build, eliminating all notions of build repeatability). Is there an ETA on correcting this for our builds? |
|
@sharwell The ADO docs do not mention anything about cleaning directories other than the working directory created by ADO. The goal of this PR is to make sure we write temp files to working directory so that the cleanup is guaranteed. We actually use the fact that IDK how would ADO know to not clean nuget cache but clean temp dir. |
Co-Authored-By: Sam Harwell <sam@tunnelvisionlabs.com>
They also guarantee cleanup of Agent.TempDirectory. This is relied on by the runtime team for cleaning up dotnet installs. |
|
@jaredpar Thanks. Found it in docs: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml |
|
OK, so we don't need to set TEMP to artifacts\tmp to get it cleaned. But |
* dotnet/master: (918 commits) Pure null test on unconstrained type (dotnet#41384) Fix file headers, bootsrap build issues. Make `elementLocations` accept an array of nullable locations in the public api. Learn from non-null tests on as operator (dotnet#41419) Use Microsoft.NET.Sdk.WindowsDesktop for XAML projects (dotnet#40234) Address feedback. Introduce `GetRequiredBinder`. Add missing `NotNullWhen` annotations. Annotate more of the binder Add version of zlib library to deterministic build inputs (dotnet#41385) [master] Update dependencies from dotnet/arcade (dotnet#41354) Simplify Simplify Do not simplify interpolation expressions on implicit receivers. Fix local function crash + add tests Substituted symbol equality (dotnet#41123) Fix test failures Rename from IncludeNonNullableReferenceTypeModifier to IncludeNotNullableReferenceTypeModifier (dotnet#41332) Set TEMP environment variable to $TempDir on CI machines (dotnet#41361) Document placeholders ...
Ensures that we don't leave temp files behind in global TEMP dir on CI machine.UPDATE: ADO cleans Agent.TempDirectory. So setting TEMP is not needed in order to get clean temp dir.
Prepare-TempDirand maybe other infra seem to expect TEMP to be set to$TempDir.dotnet/arcade#4744 reverted setting the variable in
tools.ps1due to issues it caused in other repos.