From 55d05357bb29217eb48e168492ce9822a293b011 Mon Sep 17 00:00:00 2001 From: David Gardiner Date: Wed, 10 Jun 2020 10:28:03 +0930 Subject: [PATCH] Add Azure Pipelines Cache task - Improves install performance for subsequent runs --- azure-pipelines.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 13f8e50..f51edf0 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -4,11 +4,23 @@ trigger: pool: vmImage: 'Ubuntu-16.04' +variables: + BUNDLE_PATH: $(Pipeline.Workspace)/.bundle + steps: - task: UseRubyVersion@0 inputs: versionSpec: '=2.6.2' +- task: Cache@2 + inputs: + key: 'gems | "$(Agent.OS)" | Gemfile' + restoreKeys: | + gems | "$(Agent.OS)" + gems + path: $(BUNDLE_PATH) + displayName: Cache gems + - script: | gem install bundler bundle install --retry=3 --jobs=4