.gitlab-ci.yml 3.53 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 88 89
release:
  stage: release
  script: make -C algo release RELEASE_TAG=`cat algo/release`
  when: manual
  only:
    - /^feature-a\/release$/
  artifacts:
    paths

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

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

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

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

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

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

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

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