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


before_script:
  - make data
  - make germline
6
  - make -C browser sha1
7
  - cp -p doc/analysis-example.vidjil browser/
8 9

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

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

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

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

49 50 51
deploy:
  stage: deploy
  script:
52
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
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
  stage: deploy
  script:
64
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
65
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
66 67
  environment:
    name: production
68
    url: http://app.vidjil.org/?data=analysis-example.vidjil
69 70 71
  only:
    - prod-client
    
72 73 74 75 76 77 78 79
stop_deploy:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
80
    name: review/$CI_BUILD_REF_NAME
81
    action: stop
82
  only:
83
    - /^feature-[cw]\/.*$/
84
    - /^hotfix-[cw]\/.*$/