aboutsummaryrefslogtreecommitdiff
path: root/azure-pipelines.yml
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-03-14 21:16:33 +0800
committercrupest <crupest@outlook.com>2019-03-14 21:16:33 +0800
commitd03bc77edbff574dbb3b0206b3c4953b09598beb (patch)
treed030a1df16d033d1c7506b95e10a498c5caf6957 /azure-pipelines.yml
parente519553d7b300b648906d84bdac85334212dbdd3 (diff)
downloadtimeline-d03bc77edbff574dbb3b0206b3c4953b09598beb.tar.gz
timeline-d03bc77edbff574dbb3b0206b3c4953b09598beb.tar.bz2
timeline-d03bc77edbff574dbb3b0206b3c4953b09598beb.zip
Add cache for node modules.
Diffstat (limited to 'azure-pipelines.yml')
-rw-r--r--azure-pipelines.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 35e24b31..905dffa0 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -11,7 +11,13 @@ jobs:
pool:
vmImage: 'Ubuntu-16.04'
steps:
+ - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreAndSaveCacheV1.RestoreAndSaveCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
- script: yarn install
+ condition: ne(variables['CacheRestored'], 'true')
workingDirectory: Timeline/ClientApp
displayName: Yarn Install
- script: yarn run test --no-watch --browsers=ChromeHeadless --reporters junit
@@ -30,6 +36,11 @@ jobs:
buildConfiguration: 'Release'
ASPNETCORE_ENVIRONMENT: 'Development'
steps:
+ - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreAndSaveCacheV1.RestoreAndSaveCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
- script: dotnet build --configuration $(buildConfiguration) --configfile nuget.config
displayName: Dotnet Build
- script: dotnet test Timeline.Tests --configuration $(buildConfiguration) --logger trx
@@ -49,6 +60,11 @@ jobs:
variables:
buildConfiguration: 'Release'
steps:
+ - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreAndSaveCacheV1.RestoreAndSaveCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
- script: dotnet publish Timeline/Timeline.csproj --configuration $(buildConfiguration) --output ./publish/
displayName: Dotnet Publish
- task: PublishPipelineArtifact@0