aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: e564ee76be6958dda0ffb5d49ff7f8bc479859f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
image: "debian:buster-slim"

cache: &global_cache
  key: global
  paths:
    - .yarn
    - node_modules
    - data/vicmap.geojson

stages:
  - prepare
  - build

prepare:
  stage: prepare
  cache:
    <<: *global_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 -
    - 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 data/vicmap.geojson
  when: manual

build:
  stage: build
  cache:
    <<: *global_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
    - yarn run test
    - mkdir -p dist data
    - mkdir -p data/vicmap/ll_gda94/sde_shape/whole/VIC/VMADD/layer
    - touch data/VICMAP_ADDRESS.zip
    - touch data/vicmap/ll_gda94/sde_shape/whole/VIC/VMADD/layer/address.shp
    - touch --no-create data/vicmap.geojson
    - make dist/vicmap-osm.geojson
    - make dist/vicmap-osm-uniq.geojson
    - make dist/vicmap-osm-uniq-flats.geojson
  artifacts:
    name: "build"
    paths:
      - dist
      - debug