From 41aa132e80178121038e7fafc7f0bf05bc275f3a Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Sat, 16 Jan 2021 17:43:54 +0100 Subject: [PATCH] Cache .task/ directory to lazy run tasks across stages --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec52ec8..efa1b49 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,11 @@ image: registry.gitlab.com/inetmock/ci-image +cache: &global_cache + key: ${CI_COMMIT_REF_SLUG} + paths: + - .task/ + policy: pull-push + stages: - test - build @@ -7,6 +13,8 @@ stages: test: stage: test + cache: + <<: *global_cache script: - task cli-cover-report artifacts: @@ -22,6 +30,8 @@ lint: snapshot-release: stage: build + cache: + <<: *global_cache services: - docker:dind before_script: @@ -33,6 +43,8 @@ snapshot-release: release: stage: release + cache: + <<: *global_cache services: - docker:dind only: