Clean windows agent on pipeline (#8503)

* add step to clean repo since agent does start clean

* move clean

* disable caaching for windows agent
This commit is contained in:
Anthony Dresser
2019-12-02 11:06:52 -08:00
committed by Karl Burtram
parent c9226a07c5
commit d5e26527a6

View File

@@ -7,6 +7,10 @@ steps:
inputs: inputs:
versionSpec: "1.x" versionSpec: "1.x"
- powershell: |
git clean -fxd
displayName: Clean repo
# - task: UsePythonVersion@0 # - task: UsePythonVersion@0
# inputs: # inputs:
# versionSpec: '2.x' # versionSpec: '2.x'
@@ -33,11 +37,11 @@ steps:
git merge $(node -p "require('./package.json').distro") git merge $(node -p "require('./package.json').distro")
displayName: Merge distro displayName: Merge distro
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 # - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs: # inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock' # keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules' # targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
vstsFeed: 'BuildCache' # vstsFeed: 'BuildCache'
- powershell: | - powershell: |
. build/azure-pipelines/win32/exec.ps1 . build/azure-pipelines/win32/exec.ps1
@@ -45,21 +49,21 @@ steps:
$env:CHILD_CONCURRENCY="1" $env:CHILD_CONCURRENCY="1"
exec { yarn --frozen-lockfile } exec { yarn --frozen-lockfile }
displayName: Install dependencies displayName: Install dependencies
condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) # condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 # - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs: # inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock' # keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules' # targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
vstsFeed: 'BuildCache' # vstsFeed: 'BuildCache'
condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) # condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- powershell: | # - powershell: |
. build/azure-pipelines/win32/exec.ps1 # . build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop" # $ErrorActionPreference = "Stop"
exec { yarn postinstall } # exec { yarn postinstall }
displayName: Run postinstall scripts # displayName: Run postinstall scripts
condition: and(succeeded(), eq(variables['CacheRestored'], 'true')) # condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
- powershell: | - powershell: |
. build/azure-pipelines/win32/exec.ps1 . build/azure-pipelines/win32/exec.ps1