.gitlab-ci.yml 3.36 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
Mathieu Giraud's avatar
Mathieu Giraud committed
19 20
  - valgrind_unit
  - valgrind_functional
21
  - deploy_prod
22

23

24 25 26 27 28 29
# Tools

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

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

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

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

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

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

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

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

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

Mathieu Giraud's avatar
Mathieu Giraud committed
80
# Client
81

82
test_browser_unit:
83
  stage: test_unit
84
  script: make unit_browser
85 86 87
  artifacts:
    paths:
    - browser/
88
  only:
89
    - /^feature-[cw]\/.*$/
90
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
91
    - prod-client
92
    - dev
93 94
  tags:
    - web
95

96 97
test_browser-functional:
  stage: test_functional
98 99 100 101
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
102 103 104 105 106 107 108 109
    - HEADLESS=1 make -C browser/test functional
  artifacts:
    paths:
    - browser/
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
110 111
  tags:
    - web
112 113 114

test_browser-functional-external:
  stage: test_functional_external
115
  retry: 2
116 117 118 119 120
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - HEADLESS=1 make -C browser/test external
121 122 123
  artifacts:
    paths:
    - browser/
124
  only:
125
    - /^feature-[cw]\/.*$/
126
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
127
    - prod-client
128 129
  tags:
    - web
130

131 132
code_quality:
  stage: test_quality
133
  script: make -C browser quality
134 135 136 137
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
138
    - dev
139 140
  tags:
    - web
141

142 143
deploy_review:
  stage: deploy_review
144
  script:
145
    - make -C browser icons
146
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
147
  environment:
148
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
149
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
Mathieu Giraud's avatar
Mathieu Giraud committed
150
    on_stop: stop_deploy_review
151
  only:
152
    - /^feature-[cw]\/.*$/
153
    - /^hotfix-[cw]\/.*$/
154 155
  tags:
    - web
156

157
deploy_prod:
158
  stage: deploy_prod
159
  script:
160
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
161
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
162 163
  environment:
    name: production
164
    url: http://app.vidjil.org/?data=analysis-example.vidjil
165 166
  only:
    - prod-client
167 168
  tags:
    - web
169

170 171
stop_deploy_review:
  stage: deploy_review
172 173 174 175 176 177
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
178
    name: review/$CI_BUILD_REF_NAME
179
    action: stop
180
  only:
181
    - /^feature-[cw]\/.*$/
182
    - /^hotfix-[cw]\/.*$/
183 184
  tags:
    - web