Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

.gitlab-ci.yml 5.22 KB
Newer Older
1 2 3


before_script:
Mathieu Giraud's avatar
Mathieu Giraud committed
4
  - make demo
5 6
  - make data
  - make germline
7
  - make -C browser sha1
8
  - cp -p doc/analysis-example.vidjil browser/
9 10

stages:
11
  - test_tools
12
  - test_quality
13
  - test_unit
14
  - deploy_review
15
  - test_germlines
16
  - test_functional
17
  - test_functional_external
18
  - test_shouldvdj
19
  - prepare_release
20
  - release
Mathieu Giraud's avatar
Mathieu Giraud committed
21 22
  - valgrind_unit
  - valgrind_functional
23
  - prepare_deploy
24
  - deploy_prod
25

26

27 28 29 30 31 32
# Tools

test_tools:
  stage: test_tools
  script: make -C tools/tests

33 34 35 36 37 38 39

# Germlines

test_germlines:
  stage: test_germlines
  script:
    - make -C germline get-all-data
Mathieu Giraud's avatar
Mathieu Giraud committed
40
    - make -C germline/tests
41
  only:
42
    - /^feature-.*g.*\/.*$/
43 44


Mathieu Giraud's avatar
Mathieu Giraud committed
45
# Algorithm
46 47 48

test_algo_unit:
  stage: test_unit
49
  script: make -C algo unit
50
  only:
51
    - /^feature-.*a.*\/.*$/
52 53 54 55 56

test_tools_unit:
  stage: test_unit
  script: make -C tools/tests
  only:
57
    - /^feature-.*a.*\/.*$/
58 59 60

test_algo_should:
  stage: test_functional
61
  script: make -C algo should
62
  only:
63
    - /^feature-.*a.*\/.*$/
64 65 66

test_algo_shouldvdj:
  stage: test_shouldvdj
67
  script: make -C algo shouldvdj
68
  only:
69
    - /^feature-.*a.*\/.*$/
70

Mathieu Giraud's avatar
Mathieu Giraud committed
71 72
algo_valgrind_unit:
  stage: valgrind_unit
73
  script: make -C algo valgrind_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
74
  only:
75
    - /^feature-.*a.*\/.*$/
76 77
  tags:
    - valgrind
Mathieu Giraud's avatar
Mathieu Giraud committed
78 79 80

algo_valgrind_functional:
  stage: valgrind_functional
81
  script: make -C algo valgrind_should
Mathieu Giraud's avatar
Mathieu Giraud committed
82 83
  when: manual
  only:
84
    - /^feature-.*a.*\/.*$/
85 86
  tags:
    - valgrind
Mathieu Giraud's avatar
Mathieu Giraud committed
87

88 89 90 91 92
prepare_release:
  stage: prepare_release
  script: make -C algo release RELEASE_TAG='rc'
  when: manual
  only:
93
    - /^feature-.*a.*\/.*$/
94

95 96 97 98 99
release:
  stage: release
  script: make -C algo release RELEASE_TAG=`cat algo/release`
  when: manual
  only:
100
    - /^feature-.*a.*\/release$/
101
  artifacts:
102
    paths:
103 104
    - algo/releases/vidjil-algo-`cat algo/release`.tar.gz
    - algo/releases/vidjil-algo-`cat algo/release`/vidjil-algo-`cat algo/release`_`uname -m`
105
  allow_failure: false
106 107
  tags:
    - ubuntu-16.04-amd64
108

109 110 111 112 113 114 115 116 117 118 119 120 121 122
copy_release:
  stage: prepare_deploy
  script:
    - |
      for repo in $ALGO_REPOSITORIES; do
        echo "Copying release to $repo"
        scp algo/releases/vidjil-algo*.tar.gz algo/releases/vidjil-algo*/vidjil-algo-*_* $repo
      done
      release_name=$(cat algo/release)
      ssh $VIDJIL_WWW "cd /var/www/html/releases; ln -sf vidjil-algo-${release_name}.tar.gz vidjil-latest.tgz; ln -sf vidjil-algo-${release_name}_x86_64 vidjil-latest_x86_64"
      ssh $VIDJIL_BONSAI "cd /bio1/www/html/vidjil; scp vidjil-algo-${release_name}* VIDJIL_BONSAI_PROD:/bio1/www/html/vidjil"
  only:
    - /^feature-.*a.*\/release$/

Mathieu Giraud's avatar
Mathieu Giraud committed
123
# Client
124

125
test_browser_unit:
126
  stage: test_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
127
  script: make unit_browser
128 129 130
  artifacts:
    paths:
    - browser/
131
  only:
132 133
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
134
    - prod-client
135
    - dev
136 137
  tags:
    - web
138

139 140
test_browser-functional:
  stage: test_functional
141 142 143 144
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
145 146 147 148 149
    - HEADLESS=1 make -C browser/test functional
  artifacts:
    paths:
    - browser/
  only:
150 151
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
152
    - prod-client
153 154
  tags:
    - web
155 156 157

test_browser-functional-external:
  stage: test_functional_external
158
  retry: 2
159 160 161 162 163
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - HEADLESS=1 make -C browser/test external
164 165 166
  artifacts:
    paths:
    - browser/
167
  only:
168 169
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
170
    - prod-client
171 172
  tags:
    - web
173

174 175
code_quality:
  stage: test_quality
176
  script: make -C browser quality
177
  only:
178 179
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
180
    - prod-client
181
    - dev
182 183
  tags:
    - web
184

Ryan Herbert's avatar
Ryan Herbert committed
185 186 187 188 189
# Server

test_server_unit:
    stage: test_unit
    script:
190 191
      - virtualenv $CI_BUILD_REF_SLUG
      - source $CI_BUILD_REF_SLUG/bin/activate
192
      - pip install -r requirements.txt
Ryan Herbert's avatar
Ryan Herbert committed
193
      - make -C server install_web2py_standalone
194
      - make -C server launch_fuse_server
195
      - make unit_server || (make -C server kill_fuse_server; deactivate; false)
Ryan Herbert's avatar
Ryan Herbert committed
196
      - make -C server kill_fuse_server
197
      - deactivate
Ryan Herbert's avatar
Ryan Herbert committed
198
    only:
199 200
      - /^feature-.*s.*\/.*$/
      - /^hotfix-.*s.*\/.*$/
Ryan Herbert's avatar
Ryan Herbert committed
201 202 203 204 205 206 207
      - prod-server
      - dev
    tags:
      - web

# Deployment

208 209
deploy_review:
  stage: deploy_review
210
  script:
211
    - make -C browser icons
212
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
213
  environment:
214
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
215
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
Mathieu Giraud's avatar
Mathieu Giraud committed
216
    on_stop: stop_deploy_review
217
  only:
218 219
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
220 221
  tags:
    - web
222

223
deploy_prod:
224
  stage: deploy_prod
225
  script:
226 227 228 229 230 231 232
    - ssh $PROD_CLIENT_SERVER "
         cd $PROD_CLIENT_PATH;
         git fetch
         && git reset --hard origin/prod-client
         && make -C browser
         && make -C browser sha1
         && cp doc/analysis-example.vidjil browser/"
233 234
  environment:
    name: production
235
    url: http://$PROD_CLIENT_SERVER/?data=analysis-example.vidjil
236 237
  only:
    - prod-client
238 239
  tags:
    - web
240

241 242
stop_deploy_review:
  stage: deploy_review
243 244 245 246 247 248
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
249
    name: review/$CI_BUILD_REF_NAME
250
    action: stop
251
  only:
252 253
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
254
  tags:
255
    - web