aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAndrew Harvey <andrew@alantgeo.com.au>2021-05-03 11:45:36 +1000
committerAndrew Harvey <andrew@alantgeo.com.au>2021-05-03 11:45:36 +1000
commit6f29aa3e590a77870ed8d857ccdac01009fae0c1 (patch)
tree7a87647515b49bbfc54c7879642a572a8037d01a /.gitlab-ci.yml
parent32a78fde0bc80d6b38b647942462ac12d4c64419 (diff)
use prepare job which saves results in cache to skip lengthy geojson stage
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml30
1 files changed, 27 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2476dd9..0cf08ec 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,10 +1,20 @@
image: "debian:buster-slim"
+cache:
+ key: global
+ paths:
+ - .yarn
+ - node_modules
+ - data/vicmap.geojson
+
stages:
+ - prepare
- build
-build:
- stage: build
+prepare:
+ stage: prepare
+ cache:
+ policy: push
script:
- apt-get update && apt-get install -y curl gnupg gdal-bin unzip wget make
- curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
@@ -13,9 +23,23 @@ build:
- apt-get update && apt-get install -y yarn nodejs
- yarn install
- mkdir -p dist
- - make data/VICMAP_ADDRESS.zip unzip
- make data/vicmap.geojson
+ when: manual
+
+build:
+ stage: build
+ cache:
+ policy: pull
+ script:
+ - apt-get update && apt-get install -y curl gnupg make
+ - curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
+ - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
+ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
+ - apt-get update && apt-get install -y yarn nodejs
+ - yarn install
+ - mkdir -p dist
- make dist/vicmap-osm.geojson
+ - make dist/vicmap-osm-flats.geojson
artifacts:
name: "build"
paths: