Reduce duplicate in pipeline, cache in release job

This commit is contained in:
Daniel Imms
2019-11-07 13:52:39 -08:00
parent 16409da517
commit 1d63be0506
+4 -9
View File
@@ -87,19 +87,12 @@ jobs:
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- task: CacheBeta@1
inputs:
key: yarn_puppeteer | $(Agent.OS) | yarn.lock
path: node_modules
displayName: Cache node modules
- task: YarnInstaller@3
inputs:
versionSpec: '1.x'
displayName: 'Install Yarn'
- script: yarn --frozen-lockfile
displayName: 'Install dependencies and build'
- script: yarn add puppeteer
displayName: 'Install puppeteer'
- script: |
yarn start &
sleep 10
@@ -116,8 +109,6 @@ jobs:
displayName: 'Install Node.js'
- script: yarn --frozen-lockfile
displayName: 'Install dependencies and build'
- script: yarn add puppeteer
displayName: 'Install puppeteer'
- script: |
yarn start &
sleep 10
@@ -143,6 +134,10 @@ jobs:
inputs:
versionSpec: '1.x'
displayName: 'Install Yarn'
- task: CacheBeta@1
inputs:
key: yarn2 | $(Agent.OS) | yarn.lock
path: node_modules
- script: yarn --frozen-lockfile
displayName: 'Install dependencies and build'
- script: NPM_AUTH_TOKEN="$(NPM_AUTH_TOKEN)" node ./bin/publish.js