Skip to content

Commit 7cb9893

Browse files
authored
Delete build files before packaging and increase build timeout (#4377)
* Revert "Move windows build machines to NetCorePublic-Pool. (#4375)" This reverts commit c922529. * Add step to cleanup test data before building packages to free up space * Increase build timeout.
1 parent c922529 commit 7cb9893

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

.vsts-dotnet-ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ jobs:
6565
name: Windows_x64_NetCoreApp21
6666
buildScript: build.cmd
6767
pool:
68-
name: NetCorePublic-Pool
69-
queue: buildpool.windows.10.amd64.vs2017.open
68+
name: Hosted VS2017
7069

7170
- template: /build/ci/job-template.yml
7271
parameters:
@@ -82,14 +81,12 @@ jobs:
8281
_config_short: RFX
8382
_includeBenchmarkData: false
8483
pool:
85-
name: NetCorePublic-Pool
86-
queue: buildpool.windows.10.amd64.vs2017.open
84+
name: Hosted VS2017
8785

8886
- template: /build/ci/job-template.yml
8987
parameters:
9088
name: Windows_x86_NetCoreApp21
9189
architecture: x86
9290
buildScript: build.cmd
9391
pool:
94-
name: NetCorePublic-Pool
95-
queue: buildpool.windows.10.amd64.vs2017.open
92+
name: Hosted VS2017

build/ci/job-template.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ parameters:
1010
jobs:
1111
- job: ${{ parameters.name }}
1212
${{ if eq(parameters.codeCoverage, 'false') }}:
13-
timeoutInMinutes: 40
13+
timeoutInMinutes: 60
1414
${{ if eq(parameters.codeCoverage, 'true') }}:
1515
timeoutInMinutes: 60
1616
strategy:
@@ -77,5 +77,35 @@ jobs:
7777
pathToPublish: $(Build.ArtifactStagingDirectory)
7878
artifactName: ${{ parameters.name }} $(_config_short)
7979
artifactType: container
80+
- ${{ if eq(parameters.buildScript, 'build.cmd') }}:
81+
- powershell: |
82+
$taskListOutput = & TaskList /FI "IMAGENAME eq dotnet.exe" | Out-String
83+
if ($taskListOutput.Contains("dotnet.exe"))
84+
{
85+
Write-Output "Killing dotnet.exe processes..."
86+
& taskkill /IM dotnet.exe /F
87+
}
88+
89+
if (Test-Path .\packages\)
90+
{
91+
Write-Output "Removing nuget cache dir..."
92+
Remove-Item -Force -Recurse .\packages\
93+
}
94+
95+
if (Test-Path .\test\data\external\)
96+
{
97+
Write-Output "Removing external test data..."
98+
Remove-Item -Force -Recurse .\test\data\external\
99+
}
100+
101+
mkdir .\tmp\
102+
Move-Item .\bin\obj\packages .\tmp\
103+
Write-Output "Removing bin dir..."
104+
Remove-Item -Force -Recurse .\bin\
105+
mkdir .\bin\obj\
106+
Move-Item .\tmp\packages\ .\bin\obj\
107+
Remove-Item -Force -Recurse .\tmp\
108+
Write-Output "Done cleaning up binary folder..."
109+
displayName: Clean up test data
80110
- script: ${{ parameters.buildScript }} -buildPackages
81111
displayName: Build Packages

0 commit comments

Comments
 (0)