.gitlab-ci.yml 2.46 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
  - test_shouldvdj
Mathieu Giraud's avatar
Mathieu Giraud committed
14 15
  - valgrind_unit
  - valgrind_functional
16
  - deploy
17

18

Mathieu Giraud's avatar
Mathieu Giraud committed
19
# Algorithm
20 21 22

test_algo_unit:
  stage: test_unit
23
  script: make -C algo unit
24 25
  only:
    - /^feature-a\/.*$/
26 27 28 29 30 31

test_tools_unit:
  stage: test_unit
  script: make -C tools/tests
  only:
    - /^feature-a\/.*$/
32 33 34

test_algo_should:
  stage: test_functional
35
  script: make -C algo should
36 37 38 39 40
  only:
    - /^feature-a\/.*$/

test_algo_shouldvdj:
  stage: test_shouldvdj
41
  script: make -C algo shouldvdj
42 43 44
  only:
    - /^feature-a\/.*$/

Mathieu Giraud's avatar
Mathieu Giraud committed
45 46
algo_valgrind_unit:
  stage: valgrind_unit
47
  script: make -C algo valgrind_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
48 49 50 51 52
  only:
    - /^feature-a\/.*$/

algo_valgrind_functional:
  stage: valgrind_functional
53
  script: make -C algo valgrind_should
Mathieu Giraud's avatar
Mathieu Giraud committed
54 55 56 57 58
  when: manual
  only:
    - /^feature-a\/.*$/


59

Mathieu Giraud's avatar
Mathieu Giraud committed
60
# Client
61

62
test_browser_unit:
63
  stage: test_unit
64
  script: make unit_browser
65 66 67
  artifacts:
    paths:
    - browser/
68
  only:
69
    - /^feature-[cw]\/.*$/
70
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
71
    - prod-client
72

73 74
test_browser-functional:
  stage: test_functional
75 76 77 78 79
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - make headless_browser
80 81 82
  artifacts:
    paths:
    - browser/
83
  only:
84
    - /^feature-[cw]\/.*$/
85
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
86
    - prod-client
87

88 89
code_quality:
  stage: test_quality
90
  script: make -C browser quality
91 92 93 94 95
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client

96 97 98
deploy:
  stage: deploy
  script:
99
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
100
  environment:
101
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
102
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
103
    on_stop: stop_deploy
104
  only:
105
    - /^feature-[cw]\/.*$/
106
    - /^hotfix-[cw]\/.*$/
107

108
deploy_prod:
109 110
  stage: deploy
  script:
111
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
112
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
113 114
  environment:
    name: production
115
    url: http://app.vidjil.org/?data=analysis-example.vidjil
116 117 118
  only:
    - prod-client
    
119 120 121 122 123 124 125 126
stop_deploy:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
127
    name: review/$CI_BUILD_REF_NAME
128
    action: stop
129
  only:
130
    - /^feature-[cw]\/.*$/
131
    - /^hotfix-[cw]\/.*$/