.gitlab-ci.yml 2.55 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
  - deploy_review
13
  - test_functional
14
  - test_shouldvdj
Mathieu Giraud's avatar
Mathieu Giraud committed
15 16
  - valgrind_unit
  - valgrind_functional
17
  - deploy_prod
18

19

Mathieu Giraud's avatar
Mathieu Giraud committed
20
# Algorithm
21 22 23

test_algo_unit:
  stage: test_unit
24
  script: make -C algo unit
25 26
  only:
    - /^feature-a\/.*$/
27 28 29 30 31 32

test_tools_unit:
  stage: test_unit
  script: make -C tools/tests
  only:
    - /^feature-a\/.*$/
33 34 35

test_algo_should:
  stage: test_functional
36
  script: make -C algo should
37 38 39 40 41
  only:
    - /^feature-a\/.*$/

test_algo_shouldvdj:
  stage: test_shouldvdj
42
  script: make -C algo shouldvdj
43 44 45
  only:
    - /^feature-a\/.*$/

Mathieu Giraud's avatar
Mathieu Giraud committed
46 47
algo_valgrind_unit:
  stage: valgrind_unit
48
  script: make -C algo valgrind_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
49 50 51 52 53
  only:
    - /^feature-a\/.*$/

algo_valgrind_functional:
  stage: valgrind_functional
54
  script: make -C algo valgrind_should
Mathieu Giraud's avatar
Mathieu Giraud committed
55 56 57 58 59
  when: manual
  only:
    - /^feature-a\/.*$/


60

Mathieu Giraud's avatar
Mathieu Giraud committed
61
# Client
62

63
test_browser_unit:
64
  stage: test_unit
65
  script: make unit_browser
66 67 68
  artifacts:
    paths:
    - browser/
69
  only:
70
    - /^feature-[cw]\/.*$/
71
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
72
    - prod-client
73
    - dev
74

75 76
test_browser-functional:
  stage: test_functional
77 78 79 80 81
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - make headless_browser
82 83 84
  artifacts:
    paths:
    - browser/
85
  only:
86
    - /^feature-[cw]\/.*$/
87
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
88
    - prod-client
89

90 91
code_quality:
  stage: test_quality
92
  script: make -C browser quality
93 94 95 96
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
97
    - dev
98

99 100
deploy_review:
  stage: deploy_review
101
  script:
102
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
103
  environment:
104
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
105
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
Mathieu Giraud's avatar
Mathieu Giraud committed
106
    on_stop: stop_deploy_review
107
  only:
108
    - /^feature-[cw]\/.*$/
109
    - /^hotfix-[cw]\/.*$/
110

111
deploy_prod:
112
  stage: deploy_prod
113
  script:
114
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
115
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
116 117
  environment:
    name: production
118
    url: http://app.vidjil.org/?data=analysis-example.vidjil
119 120 121
  only:
    - prod-client
    
122 123
stop_deploy_review:
  stage: deploy_review
124 125 126 127 128 129
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
130
    name: review/$CI_BUILD_REF_NAME
131
    action: stop
132
  only:
133
    - /^feature-[cw]\/.*$/
134
    - /^hotfix-[cw]\/.*$/