未验证 提交 ad3adfa2 编写于 作者: J João Moreno

retry yarn install

上级 900e4474
......@@ -85,8 +85,13 @@ steps:
export npm_config_arch=$(VSCODE_ARCH)
export npm_config_node_gyp=$(which node-gyp)
export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
ls /Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
CHILD_CONCURRENCY=1 yarn --frozen-lockfile --verbose
for i in {1..3}; do # try 3 times, for Terrapin
yarn --frozen-lockfile && break
echo "Yarn failed, trying again..."
done
env:
CHILD_CONCURRENCY: 1
displayName: Install dependencies
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
......
......@@ -74,7 +74,12 @@ steps:
- script: |
set -e
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
for i in {1..3}; do # try 3 times, for Terrapin
yarn --frozen-lockfile && break
echo "Yarn failed, trying again..."
done
env:
CHILD_CONCURRENCY: 1
displayName: Install dependencies
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
......
......@@ -68,7 +68,13 @@ steps:
- script: |
set -e
CHILD_CONCURRENCY=1 npm_config_arch=$(NPM_ARCH) yarn --frozen-lockfile
for i in {1..3}; do # try 3 times, for Terrapin
yarn --frozen-lockfile && break
echo "Yarn failed, trying again..."
done
env:
CHILD_CONCURRENCY: 1
npm_config_arch: $(NPM_ARCH)
displayName: Install dependencies
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
......
......@@ -71,7 +71,12 @@ steps:
- script: |
set -e
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
for i in {1..3}; do # try 3 times, for Terrapin
yarn --frozen-lockfile && break
echo "Yarn failed, trying again..."
done
env:
CHILD_CONCURRENCY: 1
displayName: Install dependencies
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
......
......@@ -63,7 +63,12 @@ steps:
# vstsFeed: 'npm-vscode'
- script: |
set -e
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
for i in {1..3}; do # try 3 times, for Terrapin
yarn --frozen-lockfile && break
echo "Yarn failed, trying again..."
done
env:
CHILD_CONCURRENCY: 1
displayName: Install dependencies
# condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
......
......@@ -70,10 +70,12 @@ steps:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
. build/azure-pipelines/win32/retry.ps1
$ErrorActionPreference = "Stop"
$env:npm_config_arch="$(VSCODE_ARCH)"
$env:CHILD_CONCURRENCY="1"
exec { yarn --frozen-lockfile }
retry { exec { yarn --frozen-lockfile } }
env:
npm_config_arch: $(VSCODE_ARCH)
CHILD_CONCURRENCY: 1
displayName: Install dependencies
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
......
......@@ -70,10 +70,12 @@ steps:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
. build/azure-pipelines/win32/retry.ps1
$ErrorActionPreference = "Stop"
$env:npm_config_arch="$(VSCODE_ARCH)"
$env:CHILD_CONCURRENCY="1"
exec { yarn --frozen-lockfile }
retry { exec { yarn --frozen-lockfile } }
env:
npm_config_arch: $(VSCODE_ARCH)
CHILD_CONCURRENCY: 1
displayName: Install dependencies
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
......
function Retry
{
[CmdletBinding()]
param(
[Parameter(Position=0,Mandatory=1)][scriptblock]$cmd
)
$retry = 0
while ($retry++ -lt 3) {
try {
& $cmd
return
} catch {
Write-Error -ErrorRecord $_
}
}
throw "Max retries reached"
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册