Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

.gitlab-ci.yml 1.61 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
  - deploy
14 15

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

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

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

49 50 51
deploy:
  stage: deploy
  script:
52
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
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]\/.*$/