.gitlab-ci.yml 3.71 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
    paths:
89 90
    - algo/releases/vidjil-algo-`cat algo/release`.tar.gz
    - algo/releases/vidjil-algo-`cat algo/release`/vidjil-algo-`cat algo/release`_`uname -m`
91 92
  tags:
    - ubuntu-16.04-amd64
93

Mathieu Giraud's avatar
Mathieu Giraud committed
94
# Client
95

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

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

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

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

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

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

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