.gitlab-ci.yml 834 Bytes
Newer Older
MrMan's avatar
MrMan committed
1 2 3 4 5
image: node:12-alpine

cache:
  paths:
    - node_modules
MrMan's avatar
MrMan committed
6
    - dist
MrMan's avatar
MrMan committed
7 8 9

stages:
  - lint
10 11
  - build+test
  - package
MrMan's avatar
MrMan committed
12
  - deploy
MrMan's avatar
MrMan committed
13 14 15 16 17 18 19

lint:
  stage: lint
  script:
    - apk add --update make
    - make install lint

20 21
build+test:
  stage: build+test
MrMan's avatar
MrMan committed
22 23
  script:
    - apk add --update make
24
    - make install build test
MrMan's avatar
MrMan committed
25

26 27 28 29 30 31
package:
  stage: package
  only:
    - /release-v[0-9|\.]+/
    - /v[0-9|\.]+/
    - merge_requests # anything merged into master should pass packaging testing
MrMan's avatar
MrMan committed
32 33
  script:
    - apk add --update make
34
    - make install package test-package
MrMan's avatar
MrMan committed
35 36 37

pages:
  stage: deploy
MrMan's avatar
MrMan committed
38
  only:
39
    - master
40
    - /v[0-9|\.]+/
MrMan's avatar
MrMan committed
41 42 43 44 45 46 47 48 49 50 51
  cache:
    key: default
    paths:
      - dist
    policy: pull # only pull from cache don't update it
  script:
    - apk add --update make
    - make install build-gitlab-pages
  artifacts:
    paths:
      - public