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


before_script:
  - make data
  - make germline

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

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

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

39 40
code_quality:
  stage: test_quality
41
  script: jshint browser/js/*.js
42 43 44 45 46
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client

47 48 49
deploy:
  stage: deploy
  script:
50 51
    - 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/
52
  environment:
53
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
54
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
55
    on_stop: stop_deploy
56
  only:
57
    - /^feature-[cw]\/.*$/
58
    - /^hotfix-[cw]\/.*$/
59

60
deploy_prod:
61 62 63 64 65 66 67 68
  stage: deploy
  script:
    - ssh $PROD_CLIENT_SERVER "cd $PROD_CLIENT_PATH; git fetch ; git reset --hard origin/prod-client"
  environment:
    name: production
  only:
    - prod-client
    
69 70 71 72 73 74 75 76
stop_deploy:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
77
    name: review/$CI_BUILD_REF_NAME
78
    action: stop
79
  only:
80
    - /^feature-[cw]\/.*$/
81
    - /^hotfix-[cw]\/.*$/