提交 9fea0dd0 编写于 作者: J Jared Parsons 提交者: Jared Parsons

Redirect TEMP in Jenkins runs

This was meant to be done as part of my rework of netci.groovy but it looks like I missed
it.

https://github.com/dotnet/roslyn/commit/8a078fac5c497b61f00505d3fe4cf0d92137bef3
上级 35f58079
......@@ -46,6 +46,17 @@ function Terminate-BuildProcesses() {
Get-Process vbcscompiler -ErrorAction SilentlyContinue | kill
}
# The Jenkins images used to execute our tests can live for a very long time. Over the course
# of hundreds of runs this can cause the %TEMP% folder to fill up. To avoid this we redirect
# %TEMP% into the binaries folder which is deleted at the end of every run as a part of cleaning
# up the workspace.
function Redirect-Temp() {
$temp = Join-Path $binariesDir "Temp"
Create-Directory $temp
${env:TEMP} = $temp
${env:TMP} = $temp
}
try {
. (Join-Path $PSScriptRoot "build-utils.ps1")
Push-Location $repoDir
......@@ -73,6 +84,7 @@ try {
# Ensure the binaries directory exists because msbuild can fail when part of the path to LogFile isn't present.
Create-Directory $binariesDir
Redirect-Temp
if ($testBuildCorrectness) {
Exec { & ".\build\scripts\test-build-correctness.ps1" $repoDir $configDir }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册