Skip to content

Commit

Permalink
Remove use of workspace clean within builds as it is not reliable (#789)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSimons authored Nov 6, 2018
1 parent 084b755 commit 88113bc
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .vsts-pipelines/jobs/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
pool: ${{ parameters.pool }}
strategy:
matrix: ${{ parameters.matrix }}
workspace:
clean: all
variables:
osVersion: ${{ parameters.osVersion }}
steps:
Expand Down
2 changes: 0 additions & 2 deletions .vsts-pipelines/jobs/build-test-publish-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ jobs:
pool: # linuxAmd64Pool
name: DotNet-Build
demands: agent.os -equals linux
workspace:
clean: all
steps:
- template: ../steps/init-docker-linux.yml
- script: $(runImageBuilderCmd) generateBuildMatrix --manifest $(manifest) --type build
Expand Down
2 changes: 0 additions & 2 deletions .vsts-pipelines/jobs/copy-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
pool: ${{ parameters.pool }}
strategy:
matrix: ${{ parameters.matrix }}
workspace:
clean: all
variables:
osVersion: ${{ parameters.osVersion }}
architecture: ${{ parameters.architecture }}
Expand Down
2 changes: 0 additions & 2 deletions .vsts-pipelines/jobs/publish-finalize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
- Copy_Images_NanoServer1709_amd64
- Copy_Images_NanoServer1803_amd64
pool: ${{ parameters.pool }}
workspace:
clean: all
variables:
imageBuilder.commonCmdArgs: >
--manifest $(manifest)
Expand Down
2 changes: 0 additions & 2 deletions .vsts-pipelines/jobs/test-images-linux-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
pool: ${{ parameters.pool }}
strategy:
matrix: ${{ parameters.matrix }}
workspace:
clean: all
variables:
testRunner.container: testrunner-$(Build.BuildId)-$(System.JobId)
architecture: ${{ parameters.architecture }}
Expand Down
2 changes: 0 additions & 2 deletions .vsts-pipelines/jobs/test-images-windows-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
pool: ${{ parameters.pool }}
strategy:
matrix: ${{ parameters.matrix }}
workspace:
clean: all
steps:
- template: ../steps/init-docker-windows.yml
parameters:
Expand Down
7 changes: 7 additions & 0 deletions .vsts-pipelines/steps/cleanup-docker-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ steps:
displayName: Cleanup Docker Images
condition: always()
continueOnError: true
- powershell: |
if (Test-Path $(Build.BinariesDirectory)\.Microsoft.DotNet.ImageBuilder) {
Remove-Item $(Build.BinariesDirectory)\.Microsoft.DotNet.ImageBuilder -Force -Recurse;
}
displayName: Cleanup Image Builder
condition: always()
continueOnError: true
4 changes: 2 additions & 2 deletions .vsts-pipelines/steps/init-docker-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ steps:
- script: >
docker cp
setupImageBuilder-$(Build.BuildId)-$(System.JobId):/image-builder
$(Build.BinariesDirectory)/Microsoft.DotNet.ImageBuilder
$(Build.BinariesDirectory)/.Microsoft.DotNet.ImageBuilder
displayName: Copy Image Builder
- script: docker rm -f setupImageBuilder-$(Build.BuildId)-$(System.JobId)
displayName: Cleanup Setup Container
condition: always()
continueOnError: true
- script: >
echo "##vso[task.setvariable variable=runImageBuilderCmd]
$(Build.BinariesDirectory)\Microsoft.DotNet.ImageBuilder\Microsoft.DotNet.ImageBuilder.exe
$(Build.BinariesDirectory)\.Microsoft.DotNet.ImageBuilder\Microsoft.DotNet.ImageBuilder.exe
displayName: Define runImageBuilderCmd Variable

0 comments on commit 88113bc

Please sign in to comment.