.gitlab-ci.yml 1.02 KB
Newer Older
1 2 3 4 5 6
stages:
  - test
  - syntaxe
  - doc
  - deploy

Florent Chehab's avatar
Florent Chehab committed
7 8
testing:
  stage: test
Florent Chehab's avatar
Florent Chehab committed
9 10 11
  image: python:3.6.5-jessie
  services:
    - postgres:9.6.8
Florent Chehab's avatar
Florent Chehab committed
12
  script:
Florent Chehab's avatar
Florent Chehab committed
13
    - export ENV=development
Florent Chehab's avatar
Florent Chehab committed
14
    - export DATABASE_URL=postgres://postgres:@postgres:5432/python-test-app
15 16 17
    - make install_backend
    - make check_backend
    - make test_backend_server
Florent Chehab's avatar
Florent Chehab committed
18 19 20 21 22 23 24
  artifacts:
    paths:
      - htmlcov/
    expire_in: 1 month
  tags:
    - docker

Florent Chehab's avatar
Florent Chehab committed
25
flake8:
26
  stage: syntaxe
Florent Chehab's avatar
Florent Chehab committed
27
  image: python:3.6.5-jessie
Florent Chehab's avatar
Florent Chehab committed
28
  script:
Florent Chehab's avatar
clean  
Florent Chehab committed
29
    - pip install flake8
Florent Chehab's avatar
Florent Chehab committed
30 31 32 33
    - flake8
  tags:
    - docker

Florent Chehab's avatar
Florent Chehab committed
34
pages:
35 36
  stage: doc
  image: floawfloaw/plantuml
Florent Chehab's avatar
Florent Chehab committed
37 38 39
  dependencies:
    - testing
  script:
40 41
    - mkdir .public
    - mv htmlcov/ .public/coverage
42
    - make docs
43 44
    - mv docs/ .public/docs
    - mv .public public
Florent Chehab's avatar
Florent Chehab committed
45 46 47 48
  artifacts:
    paths:
      - public
    expire_in: 1 month
Florent Chehab's avatar
Florent Chehab committed
49 50
  only: 
    - master
Florent Chehab's avatar
Florent Chehab committed
51 52
  tags:
    - docker
Florent Chehab's avatar
Florent Chehab committed
53 54 55 56 57 58 59 60

preprod:
  type: deploy
  image: ruby
  script:
  - gem install dpl
  - dpl --provider=heroku --app=outgoing-preprod --api-key=$HEROKU_API_KEY
  only:
Florent Chehab's avatar
Florent Chehab committed
61
  - production
Florent Chehab's avatar
Florent Chehab committed
62 63
  tags:
    - docker