From b9a95313cd3bb2053ce6517568102bbcc39a26ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jovan=20Kruni=C4=87?= Date: Fri, 26 Apr 2019 15:17:18 +0200 Subject: [PATCH] ci: use cache instead of artifacts for node modules --- .gitlab-ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1546445..0a3ec554 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,13 @@ image: registry.gitlab.com/openstapps/app +cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - node_modules + +before_script: + - npm install + stages: - setup - build @@ -20,6 +28,8 @@ setup: - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com - docker build -t registry.gitlab.com/openstapps/app . - docker push registry.gitlab.com/openstapps/app + cache: {} # disable irrelevant cache for this job + before_script: [] # do not run irrelevant before script for this job tags: - docker @@ -30,7 +40,6 @@ build: - npm run build artifacts: paths: - - node_modules - www unit: