.gitlab-ci.yml 3.68 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

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

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

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

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

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

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

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

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