.gitlab-ci.yml 988 Bytes
Newer Older
1
image: alpine:3.7
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 nodejs-npm
14
    - npm install mocha -g
15
    - mocha --exit
16
17
    - git submodule init
    - git submodule update
Tim Martin's avatar
Tim Martin committed
18
19
20
    - mvn install

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

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


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

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