.gitlab-ci.yml 3.58 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_functional
16
  - test_functional_external
17
  - test_shouldvdj
18
  - prepare_release
19
  - release
Mathieu Giraud's avatar
Mathieu Giraud committed
20 21
  - valgrind_unit
  - valgrind_functional
22
  - deploy_prod
23

24

25 26 27 28 29 30
# Tools

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

Mathieu Giraud's avatar
Mathieu Giraud committed
31
# Algorithm
32 33 34

test_algo_unit:
  stage: test_unit
35
  script: make -C algo unit
36 37
  only:
    - /^feature-a\/.*$/
38 39 40 41 42 43

test_tools_unit:
  stage: test_unit
  script: make -C tools/tests
  only:
    - /^feature-a\/.*$/
44 45 46

test_algo_should:
  stage: test_functional
47
  script: make -C algo should
48 49 50 51 52
  only:
    - /^feature-a\/.*$/

test_algo_shouldvdj:
  stage: test_shouldvdj
53
  script: make -C algo shouldvdj
54 55 56
  only:
    - /^feature-a\/.*$/

Mathieu Giraud's avatar
Mathieu Giraud committed
57 58
algo_valgrind_unit:
  stage: valgrind_unit
59
  script: make -C algo valgrind_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
60 61
  only:
    - /^feature-a\/.*$/
62 63
  tags:
    - valgrind
Mathieu Giraud's avatar
Mathieu Giraud committed
64 65 66

algo_valgrind_functional:
  stage: valgrind_functional
67
  script: make -C algo valgrind_should
Mathieu Giraud's avatar
Mathieu Giraud committed
68 69 70
  when: manual
  only:
    - /^feature-a\/.*$/
71 72
  tags:
    - valgrind
Mathieu Giraud's avatar
Mathieu Giraud committed
73

74 75 76 77 78 79
prepare_release:
  stage: prepare_release
  script: make -C algo release RELEASE_TAG='rc'
  when: manual
  only:
    - /^feature-a\/.*$/
80

81 82 83 84 85 86 87
release:
  stage: release
  script: make -C algo release RELEASE_TAG=`cat algo/release`
  when: manual
  only:
    - /^feature-a\/release$/
  artifacts:
88 89
    paths:
    - algo/releases/vidjil-`cat algo/release`.tar.gz
90

Mathieu Giraud's avatar
Mathieu Giraud committed
91
# Client
92

93
test_browser_unit:
94
  stage: test_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
95
  script: make unit_browser
96 97 98
  artifacts:
    paths:
    - browser/
99
  only:
100
    - /^feature-[cw]\/.*$/
101
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
102
    - prod-client
103
    - dev
104 105
  tags:
    - web
106

107 108
test_browser-functional:
  stage: test_functional
109 110 111 112
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
113 114 115 116 117 118 119 120
    - HEADLESS=1 make -C browser/test functional
  artifacts:
    paths:
    - browser/
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
121 122
  tags:
    - web
123 124 125

test_browser-functional-external:
  stage: test_functional_external
126
  retry: 2
127 128 129 130 131
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - HEADLESS=1 make -C browser/test external
132 133 134
  artifacts:
    paths:
    - browser/
135
  only:
136
    - /^feature-[cw]\/.*$/
137
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
138
    - prod-client
139 140
  tags:
    - web
141

142 143
code_quality:
  stage: test_quality
144
  script: make -C browser quality
145 146 147 148
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
149
    - dev
150 151
  tags:
    - web
152

153 154
deploy_review:
  stage: deploy_review
155
  script:
156
    - make -C browser icons
157
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
158
  environment:
159
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
160
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
Mathieu Giraud's avatar
Mathieu Giraud committed
161
    on_stop: stop_deploy_review
162
  only:
163
    - /^feature-[cw]\/.*$/
164
    - /^hotfix-[cw]\/.*$/
165 166
  tags:
    - web
167

168
deploy_prod:
169
  stage: deploy_prod
170
  script:
171
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
172
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
173 174
  environment:
    name: production
175
    url: http://app.vidjil.org/?data=analysis-example.vidjil
176 177
  only:
    - prod-client
178 179
  tags:
    - web
180

181 182
stop_deploy_review:
  stage: deploy_review
183 184 185 186 187 188
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
189
    name: review/$CI_BUILD_REF_NAME
190
    action: stop
191
  only:
192
    - /^feature-[cw]\/.*$/
193
    - /^hotfix-[cw]\/.*$/
194 195
  tags:
    - web