Avoid touching continuous-build-*

This commit is contained in:
Alexandru Dima 2020-12-24 21:29:00 +01:00
parent 4248e3f7e8
commit ddb88dac9b
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0
3 changed files with 36 additions and 67 deletions

View file

@ -12,37 +12,29 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js > .build/yarnlockhash
displayName: Prepare yarn cache flags
- task: Cache@2
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs:
key: 'continuousNodeModules | $(Agent.OS) | .build/yarnlockhash'
path: .build/node_modules_cache
cacheHitVar: NODE_MODULES_RESTORED
displayName: Cache node_modules archive
- script: |
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Extract node_modules archive
keyfile: ".build/yarnlockhash"
targetfolder: "**/node_modules, !**/node_modules/**/node_modules"
vstsFeed: "vscode-build-cache"
- script: |
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
displayName: Install Dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- script: |
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs:
keyfile: ".build/yarnlockhash"
targetfolder: "**/node_modules, !**/node_modules/**/node_modules"
vstsFeed: "vscode-build-cache"
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- script: |
set -e
yarn postinstall
displayName: Run postinstall scripts
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
- script: |
yarn electron x64
@ -68,11 +60,6 @@ steps:
./scripts/test.sh --tfs "Unit Tests"
displayName: Run Unit Tests (Electron)
- script: |
set -e
yarn playwright-install
displayName: Download Playwright
- script: |
yarn test-browser --browser chromium --browser webkit --browser firefox --tfs "Browser Unit Tests"
displayName: Run Unit Tests (Browser)

View file

@ -21,37 +21,29 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js > .build/yarnlockhash
displayName: Prepare yarn cache flags
- task: Cache@2
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs:
key: 'continuousNodeModules | $(Agent.OS) | .build/yarnlockhash'
path: .build/node_modules_cache
cacheHitVar: NODE_MODULES_RESTORED
displayName: Cache node_modules archive
- script: |
set -e
tar -xzf .build/node_modules_cache/cache.tgz
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Extract node_modules archive
keyfile: ".build/yarnlockhash"
targetfolder: "**/node_modules, !**/node_modules/**/node_modules"
vstsFeed: "vscode-build-cache"
- script: |
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
displayName: Install Dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- script: |
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs:
keyfile: ".build/yarnlockhash"
targetfolder: "**/node_modules, !**/node_modules/**/node_modules"
vstsFeed: "vscode-build-cache"
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- script: |
set -e
yarn postinstall
displayName: Run postinstall scripts
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
- script: |
yarn electron x64

View file

@ -17,42 +17,32 @@ steps:
node build/azure-pipelines/common/computeNodeModulesCacheKey.js > .build/yarnlockhash
displayName: Prepare yarn cache flags
- task: Cache@2
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs:
key: 'continuousNodeModules | $(Agent.OS) | .build/arch, .build/terrapin, .build/yarnlockhash'
path: .build/node_modules_cache
cacheHitVar: NODE_MODULES_RESTORED
displayName: Cache node_modules archive
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { 7z.exe x .build/node_modules_cache/cache.7z -aos }
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Extract node_modules archive
keyfile: ".build/yarnlockhash"
targetfolder: "**/node_modules, !**/node_modules/**/node_modules"
vstsFeed: "vscode-build-cache"
- powershell: |
yarn --frozen-lockfile
env:
CHILD_CONCURRENCY: "1"
displayName: Install Dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt }
exec { mkdir -Force .build/node_modules_cache }
exec { 7z.exe a .build/node_modules_cache/cache.7z -mx3 `@.build/node_modules_list.txt }
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs:
keyfile: ".build/yarnlockhash"
targetfolder: "**/node_modules, !**/node_modules/**/node_modules"
vstsFeed: "vscode-build-cache"
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { yarn postinstall }
displayName: Run postinstall scripts
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
- powershell: |
yarn electron