Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.15 KiB
Newer Older
Eliot Berriot's avatar
Eliot Berriot committed
stages:
  - test
Eliot Berriot's avatar
Eliot Berriot committed
  - build
Eliot Berriot's avatar
Eliot Berriot committed

test_api:
  stage: test
  image: funkwhale/funkwhale:base
Eliot Berriot's avatar
Eliot Berriot committed
  before_script:
    - cd api
    - pip install -r requirements/test.txt
Eliot Berriot's avatar
Eliot Berriot committed
  script:
Eliot Berriot's avatar
Eliot Berriot committed

  tags:
Eliot Berriot's avatar
Eliot Berriot committed

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
Eliot Berriot's avatar
Eliot Berriot committed
  stage: test
  image: alpine
  before_script:
    - cd docs
  script:
    - apk --no-cache add py2-pip python-dev
    - pip install sphinx
    - apk --no-cache add make
    - make html
Eliot Berriot's avatar
Eliot Berriot committed
    - mv _build/html/ ../public
  artifacts:
    paths:
      - public
  only:
Eliot Berriot's avatar
Eliot Berriot committed
  tags:
    - docker
    - docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
    - cd api
  script:
    - docker build -t funkwhale/funkwhale:$CI_COMMIT_REF_NAME .
    - docker push funkwhale/funkwhale:$CI_COMMIT_REF_NAME
  only:
    - develop
    - master
  tags:
    - dind