.gitlab-ci.yml 1021 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
stages:
  - test
  - build

test_api:
  stage: test
  before_script:
    - docker-compose -f api/test.yml build
  script:
    - docker-compose -f api/test.yml run test
  after_script:
    - docker-compose -f api/test.yml run test rm -rf funkwhale_api/media/

  tags:
    - dind

build_front:
  stage: build
  image: node:6-alpine
  before_script:
    - cd front

  script:
    - npm install
    - npm run build
  cache:
    key: "$CI_COMMIT_REF_NAME"
    paths:
      - front/node_modules
  artifacts:
    name: "front_${CI_COMMIT_REF_NAME}"
    paths:
      - front/dist/
  only:
    - master
    - develop
  tags:
    - 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