.gitlab-ci.yml 2.33 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
  - test_shouldvdj
Mathieu Giraud's avatar
Mathieu Giraud committed
14 15
  - valgrind_unit
  - valgrind_functional
16
  - deploy
17

18

Mathieu Giraud's avatar
Mathieu Giraud committed
19
# Algorithm
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

test_algo_unit:
  stage: test_unit
  script: make unit
  only:
    - /^feature-a\/.*$/

test_algo_should:
  stage: test_functional
  script: make should
  only:
    - /^feature-a\/.*$/

test_algo_shouldvdj:
  stage: test_shouldvdj
  script: make shouldvdj
  only:
    - /^feature-a\/.*$/

Mathieu Giraud's avatar
Mathieu Giraud committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52
algo_valgrind_unit:
  stage: valgrind_unit
  script: make valgrind_unit
  only:
    - /^feature-a\/.*$/

algo_valgrind_functional:
  stage: valgrind_functional
  script: make valgrind_should
  when: manual
  only:
    - /^feature-a\/.*$/


53

Mathieu Giraud's avatar
Mathieu Giraud committed
54
# Client
55

56
test_browser_unit:
57
  stage: test_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
58
  script: make unit_browser
59 60 61
  artifacts:
    paths:
    - browser/
62
  only:
63
    - /^feature-[cw]\/.*$/
64
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
65
    - prod-client
66

67 68
test_browser-functional:
  stage: test_functional
69 70 71 72 73
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - make headless_browser
74 75 76
  artifacts:
    paths:
    - browser/
77
  only:
78
    - /^feature-[cw]\/.*$/
79
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
80
    - prod-client
81

82 83
code_quality:
  stage: test_quality
84
  script: make -C browser quality
85 86 87 88 89
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client

90 91 92
deploy:
  stage: deploy
  script:
93
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
94
  environment:
95
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
96
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
97
    on_stop: stop_deploy
98
  only:
99
    - /^feature-[cw]\/.*$/
100
    - /^hotfix-[cw]\/.*$/
101

102
deploy_prod:
103 104
  stage: deploy
  script:
105
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
106
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
107 108
  environment:
    name: production
109
    url: http://app.vidjil.org/?data=analysis-example.vidjil
110 111 112
  only:
    - prod-client
    
113 114 115 116 117 118 119 120
stop_deploy:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
121
    name: review/$CI_BUILD_REF_NAME
122
    action: stop
123
  only:
124
    - /^feature-[cw]\/.*$/
125
    - /^hotfix-[cw]\/.*$/