From 3f4738f4323bf1ef4ad937b001784a071d7d2c0f Mon Sep 17 00:00:00 2001 From: jpic Date: Sun, 16 Feb 2020 18:21:04 +0100 Subject: [PATCH] Gitlab cache --- .gitlab-ci.yml | 8 +++++++- shlaxfile.py | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f141d1c..eb40472 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,10 @@ -build: {image: yourlabs/shlax, script: ./shlaxfile.py build, stage: build} +build: + cache: + key: cache + paths: [.cache] + image: yourlabs/shlax + script: ./shlaxfile.py build + stage: build pypi: image: yourlabs/python only: [tags] diff --git a/shlaxfile.py b/shlaxfile.py index 15f6e5d..26f7a36 100755 --- a/shlaxfile.py +++ b/shlaxfile.py @@ -38,7 +38,8 @@ gitlabci = GitLabCI( build=dict( stage='build', image='yourlabs/shlax', - script='./shlaxfile.py -d shlax build', + script='CACHE_DIR=$(pwd)/.cache ./shlaxfile.py -d shlax build push', + cache=dict(paths=['.cache'], key='cache'), ), test=dict( stage='test',