.gitlab-ci.yml 1.66 KB
Newer Older
1 2 3 4 5


before_script:
  - make data
  - make germline
6
  - make -C browser sha1
7 8

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

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

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

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

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

61
deploy_prod:
62 63 64 65 66 67 68 69
  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
    
70 71 72 73 74 75 76 77
stop_deploy:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
78
    name: review/$CI_BUILD_REF_NAME
79
    action: stop
80
  only:
81
    - /^feature-[cw]\/.*$/
82
    - /^hotfix-[cw]\/.*$/