.gitlab-ci.yml 1022 Bytes
Newer Older
Eliot Berriot's avatar
Eliot Berriot committed
1
stages:
2
  - test
3
  - build
4
5
6

test_api:
  stage: test
7
  before_script:
8
    - docker-compose -f api/test.yml build
9
  script:
10
    - docker-compose -f api/test.yml run test
11
  after_script:
Eliot Berriot's avatar
Typo    
Eliot Berriot committed
12
    - docker-compose -f api/test.yml run test rm -rf funkwhale_api/media/*
13
14
15
16
17
18

  tags:
    - dind

build_front:
  stage: build
19
  image: node:6-alpine
20
21
  before_script:
    - cd front
22

23
  script:
24
25
    - npm install
    - npm run build
26
27
28
29
  cache:
    key: "$CI_COMMIT_REF_NAME"
    paths:
      - front/node_modules
30
  artifacts:
31
    name: "front_${CI_COMMIT_REF_NAME}"
32
    paths:
Eliot Berriot's avatar
Eliot Berriot committed
33
      - front/dist/
Eliot Berriot's avatar
Eliot Berriot committed
34
35
36
  only:
    - master
    - develop
37
  tags:
38
39
    - docker

40

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
# variables:
#   DOCKER_DRIVER: overlay
#
# services:
# - docker:dind
#
#
# # build:
# #   stage: build
# #   script:
# #   - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
# #   - docker build -t funkwhale/front .
# #   - docker push
# #
# #   tags:
# #     - dind
# #   only:
# #     - master