.gitlab-ci.yml 1.27 KB
Newer Older
1 2 3 4 5 6 7


before_script:
  - make data
  - make germline

stages:
8
  - test_unit
9
  - test_functional
10
  - deploy
11 12

test_browser_unit:
13
  stage: test_unit
14
  script: make unit_browser
15 16 17
  artifacts:
    paths:
    - browser/
18
  only:
19
    - /^feature-[cw]\/.*$/
20
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
21
    - prod-client
22

23 24
test_browser-functional:
  stage: test_functional
25 26 27 28 29
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - make headless_browser
30 31 32
  artifacts:
    paths:
    - browser/
33
  only:
34
    - /^feature-[cw]\/.*$/
35
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
36
    - prod-client
37

38 39 40
deploy:
  stage: deploy
  script:
41 42
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
    - scp doc/analysis-example.vidjil $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG/browser/
43
  environment:
44
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
45
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
46
    on_stop: stop_deploy
47
  only:
48
    - /^feature-[cw]\/.*$/
49
    - /^hotfix-[cw]\/.*$/
50 51 52 53 54 55 56 57 58

stop_deploy:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
59
    name: review/$CI_BUILD_REF_NAME
60
    action: stop
61
  only:
62
    - /^feature-[cw]\/.*$/
63
    - /^hotfix-[cw]\/.*$/