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

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

build:
  stage: build
9
10
  services:
    - mongo:latest
Tim Martin's avatar
Tim Martin committed
11
  script:
12
    - apk add --update nodejs=8.14.0-r0 nodejs-npm=8.14.0-r0
13
    - ls
14
    - npm install mocha
15
    - npm init
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: 1s
Tim Martin's avatar
Tim Martin committed
23
24
    paths:
      - target/clif-webui-*.war
25

Tim Martin's avatar
Tim Martin committed
26
27
pages:
  stage: deploy
28
29
  only:
    - master
30
31
  # As build job artifact expired (almost) immediately we need to exclude all artifacts generated by the build job from pages job dependencies. Defining an empty array prevent pages job from download build job artifacts.
  dependencies: []
Tim Martin's avatar
Tim Martin committed
32
  script:
33
    - mkdir -p public/download
34
35
36
    - cd public/download && ../../gitlab-pages/bin/download-page.sh > index.html
    - cp -a ../../gitlab-pages/images ../

Tim Martin's avatar
Tim Martin committed
37
  artifacts:
38
    expire_in: 1h
Tim Martin's avatar
Tim Martin committed
39
40
    paths:
      - public