.gitlab-ci.yml 2.91 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
  - deploy_review
13
  - test_functional
14
  - test_functional_external
15
  - test_shouldvdj
16 17
  - valgrind_unit
  - valgrind_functional
18
  - deploy_prod
19

20

21
# Algorithm
22 23 24

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

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

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

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

47 48
algo_valgrind_unit:
  stage: valgrind_unit
49
  script: make -C algo valgrind_unit
50 51 52 53 54
  only:
    - /^feature-a\/.*$/

algo_valgrind_functional:
  stage: valgrind_functional
55
  script: make -C algo valgrind_should
56 57 58 59 60
  when: manual
  only:
    - /^feature-a\/.*$/


61

62
# Client
63

64
test_browser_unit:
65
  stage: test_unit
66
  script: make unit_browser
67 68 69
  artifacts:
    paths:
    - browser/
70
  only:
71
    - /^feature-[cw]\/.*$/
72
    - /^hotfix-[cw]\/.*$/
73
    - prod-client
74
    - dev
75

76 77
test_browser-functional:
  stage: test_functional
78 79 80 81
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
    - HEADLESS=1 make -C browser/test functional
  artifacts:
    paths:
    - browser/
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client

test_browser-functional-external:
  stage: test_functional_external
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - HEADLESS=1 make -C browser/test external
98 99 100
  artifacts:
    paths:
    - browser/
101
  only:
102
    - /^feature-[cw]\/.*$/
103
    - /^hotfix-[cw]\/.*$/
104
    - prod-client
105

106 107
code_quality:
  stage: test_quality
108
  script: make -C browser quality
109 110 111 112
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
113
    - dev
114

115 116
deploy_review:
  stage: deploy_review
117
  script:
118
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
119
  environment:
120
    name: review/$CI_BUILD_REF_NAME
121
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
Mathieu Giraud's avatar
Mathieu Giraud committed
122
    on_stop: stop_deploy_review
123
  only:
124
    - /^feature-[cw]\/.*$/
125
    - /^hotfix-[cw]\/.*$/
126

127
deploy_prod:
128
  stage: deploy_prod
129
  script:
130
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
131
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
132 133
  environment:
    name: production
134
    url: http://app.vidjil.org/?data=analysis-example.vidjil
135 136 137
  only:
    - prod-client
    
138 139
stop_deploy_review:
  stage: deploy_review
140 141 142 143 144 145
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
146
    name: review/$CI_BUILD_REF_NAME
147
    action: stop
148
  only:
149
    - /^feature-[cw]\/.*$/
150
    - /^hotfix-[cw]\/.*$/