.gitlab-ci.yml 1.01 KB
Newer Older
1
image: alpine:3.8
Tim Martin's avatar
Tim Martin committed
2
3

stages:
4
  - build
5
  - test
Tim Martin's avatar
Tim Martin committed
6
7
8
9
  - deploy

build:
  stage: build
10
11
  services:
    - mongo:latest
Tim Martin's avatar
Tim Martin committed
12
  script:
13
    - apk add --update nodejs=8.14.0-r0 nodejs-npm=8.14.0-r0
14
    - npm install --global mocha
15
    - npm i mocha
16
    - mocha --exit
17
18
    - git submodule init
    - git submodule update
Tim Martin's avatar
Tim Martin committed
19
20
21
    - mvn install

  artifacts:
22
    expire_in: never
Tim Martin's avatar
Tim Martin committed
23
24
    paths:
      - target/clif-webui-*.war
25
26

test:
27
  stage: test
28
29
  services:
    - mongo:latest
30
31
  dependencies:
    - build
32
33
  before_script:
    - docker info
34
  script:
35
    - docker run -t -i maven latest -c bash
36
    - docker container run alpine ls -l
37
38
    - cat /etc/os-release
    - apk add --update npm
39
    - npm install
40
    - npm i mocha -g
41
42
43
    - mocha --timeout 10000 --exit


Tim Martin's avatar
Tim Martin committed
44
45
pages:
  stage: deploy
46
47
48
49
  only:
    - master
  dependencies:
    - build
Tim Martin's avatar
Tim Martin committed
50
  script:
51
    - mkdir -p public/download
52
53
54
    - cd public/download && ../../gitlab-pages/bin/download-page.sh > index.html
    - cp -a ../../gitlab-pages/images ../

Tim Martin's avatar
Tim Martin committed
55
  artifacts:
56
    expire_in: 1h
Tim Martin's avatar
Tim Martin committed
57
58
    paths:
      - public