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 6.01 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
  - coverage
20
  - prepare_release
21
  - release
Mathieu Giraud's avatar
Mathieu Giraud committed
22 23
  - valgrind_unit
  - valgrind_functional
24
  - prepare_deploy
25
  - deploy_prod
26

27 28 29 30 31 32 33
# Anchors

.coverage_dependency: &lcov_artifact
  artifacts:
    paths:
      - algo/lcov_test_*.filtered
    expire_in: 6hrs
34

35 36 37 38 39 40
# Tools

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

41 42 43 44 45 46 47

# Germlines

test_germlines:
  stage: test_germlines
  script:
    - make -C germline get-all-data
Mathieu Giraud's avatar
Mathieu Giraud committed
48
    - make -C germline/tests
49
  only:
50
    - /^feature-.*g.*\/.*$/
51 52


Mathieu Giraud's avatar
Mathieu Giraud committed
53
# Algorithm
54 55 56

test_algo_unit:
  stage: test_unit
57
  script: make -C algo unit_coverage
58
  <<: *lcov_artifact
59
  only:
60
    - /^feature-.*a.*\/.*$/
61 62 63 64 65

test_tools_unit:
  stage: test_unit
  script: make -C tools/tests
  only:
66
    - /^feature-.*a.*\/.*$/
67 68 69

test_algo_should:
  stage: test_functional
70
  script: make -C algo should_coverage
71
  only:
72
    - /^feature-.*a.*\/.*$/
73
  <<: *lcov_artifact
74 75 76

test_algo_shouldvdj:
  stage: test_shouldvdj
77
  script: make -C algo shouldvdj_coverage
78
  <<: *lcov_artifact
79 80 81 82 83
  only:
    - /^feature-.*a.*\/.*$/

algo_coverage:
  stage: coverage
84
  coverage: /^\s*lines\.*:\s+([0-9.]+\%)/
85
  script: make -C algo lcov_reports
86 87 88
  artifacts:
    paths:
      - algo/reports/
89
  only:
90
    - /^feature-.*a.*\/.*$/
91

Mathieu Giraud's avatar
Mathieu Giraud committed
92 93
algo_valgrind_unit:
  stage: valgrind_unit
94
  script: make -C algo valgrind_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
95
  only:
96
    - /^feature-.*a.*\/.*$/
97 98
  tags:
    - valgrind
Mathieu Giraud's avatar
Mathieu Giraud committed
99 100 101

algo_valgrind_functional:
  stage: valgrind_functional
102
  script: make -C algo valgrind_should
Mathieu Giraud's avatar
Mathieu Giraud committed
103 104
  when: manual
  only:
105
    - /^feature-.*a.*\/.*$/
106 107
  tags:
    - valgrind
Mathieu Giraud's avatar
Mathieu Giraud committed
108

109 110 111 112 113
prepare_release:
  stage: prepare_release
  script: make -C algo release RELEASE_TAG='rc'
  when: manual
  only:
114
    - /^feature-.*a.*\/.*$/
115

116 117 118 119 120
release:
  stage: release
  script: make -C algo release RELEASE_TAG=`cat algo/release`
  when: manual
  only:
121
    - /^feature-.*a.*\/release$/
122
  artifacts:
123
    paths:
124 125
    - algo/releases/vidjil-algo-`cat algo/release`.tar.gz
    - algo/releases/vidjil-algo-`cat algo/release`/vidjil-algo-`cat algo/release`_`uname -m`
126
  allow_failure: false
127 128
  tags:
    - ubuntu-16.04-amd64
129

130 131 132 133 134 135 136 137 138 139 140 141 142 143
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$/

144 145 146 147 148 149 150 151 152 153 154 155
deploy_release_prod:
  stage: deploy_prod
  only:
    - /^feature-.*a.*\/release$/
  script:
    - |
      release_name=$(cat algo/release)
      ssh $VIDJIL_SERVER "cd releases/vidjil;\
          tar xvzf vidjil-algo-${release_name}.tar.gz;\
          make -C vidjil-algo-${release_name}
          ln -sf vidjil-algo-${release_name} next"

Mathieu Giraud's avatar
Mathieu Giraud committed
156
# Client
157

158
test_browser_unit:
159
  stage: test_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
160
  script: make unit_browser
161 162 163
  artifacts:
    paths:
    - browser/
164
  only:
165 166
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
167
    - prod-client
168
    - dev
169 170
  tags:
    - web
171

172 173
test_browser-functional:
  stage: test_functional
174 175 176 177
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
178 179 180 181 182
    - HEADLESS=1 make -C browser/test functional
  artifacts:
    paths:
    - browser/
  only:
183 184
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
185
    - prod-client
186 187
  tags:
    - web
188 189 190

test_browser-functional-external:
  stage: test_functional_external
191
  retry: 2
192 193 194 195 196
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - HEADLESS=1 make -C browser/test external
197 198 199
  artifacts:
    paths:
    - browser/
200
  only:
201 202
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
203
    - prod-client
204 205
  tags:
    - web
206

207 208
code_quality:
  stage: test_quality
209
  script: make -C browser quality
210
  only:
211 212
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
213
    - prod-client
214
    - dev
215 216
  tags:
    - web
217

Ryan Herbert's avatar
Ryan Herbert committed
218 219 220 221 222
# Server

test_server_unit:
    stage: test_unit
    script:
223 224
      - virtualenv $CI_BUILD_REF_SLUG
      - source $CI_BUILD_REF_SLUG/bin/activate
225
      - pip install -r requirements.txt
Ryan Herbert's avatar
Ryan Herbert committed
226
      - make -C server install_web2py_standalone
227
      - make -C server launch_fuse_server
228
      - make unit_server || (make -C server kill_fuse_server; deactivate; false)
Ryan Herbert's avatar
Ryan Herbert committed
229
      - make -C server kill_fuse_server
230
      - deactivate
Ryan Herbert's avatar
Ryan Herbert committed
231
    only:
232 233
      - /^feature-.*s.*\/.*$/
      - /^hotfix-.*s.*\/.*$/
Ryan Herbert's avatar
Ryan Herbert committed
234 235 236 237 238 239 240
      - prod-server
      - dev
    tags:
      - web

# Deployment

241 242
deploy_review:
  stage: deploy_review
243
  script:
244
    - make -C browser icons
245
    - echo "$REVIEW_CONFIG_JS" > browser/js/conf.js
246
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
247
  environment:
248
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
249
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
Mathieu Giraud's avatar
Mathieu Giraud committed
250
    on_stop: stop_deploy_review
251
  only:
252 253
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
254 255
  tags:
    - web
256

257
deploy_prod:
258
  stage: deploy_prod
259
  script:
260 261 262 263 264 265 266
    - 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/"
267 268
  environment:
    name: production
269
    url: http://$PROD_CLIENT_SERVER/?data=analysis-example.vidjil
270 271
  only:
    - prod-client
272 273
  tags:
    - web
274

275 276
stop_deploy_review:
  stage: deploy_review
277 278 279 280 281 282
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
283
    name: review/$CI_BUILD_REF_NAME
284
    action: stop
285
  only:
286 287
    - /^feature-.*c.*\/.*$/
    - /^hotfix-.*c.*\/.*$/
288
  tags:
289
    - web