Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

.gitlab-ci.yml 1.65 KB
Newer Older
1 2 3 4 5 6 7


before_script:
  - make data
  - make germline

stages:
8
  - test_quality
9
  - test_unit
10
  - test_functional
11
  - deploy
12 13

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

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

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

48 49 50
deploy:
  stage: deploy
  script:
51 52
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
    - scp doc/analysis-example.vidjil $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG/browser/
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 64 65 66 67 68 69
  stage: deploy
  script:
    - ssh $PROD_CLIENT_SERVER "cd $PROD_CLIENT_PATH; git fetch ; git reset --hard origin/prod-client"
  environment:
    name: production
  only:
    - prod-client
    
70 71 72 73 74 75 76 77
stop_deploy:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
78
    name: review/$CI_BUILD_REF_NAME
79
    action: stop
80
  only:
81
    - /^feature-[cw]\/.*$/
82
    - /^hotfix-[cw]\/.*$/